cobra: Picovoice Error (code `00000136`) when running cobra on RPI via Node

Have you checked the docs and existing issues?

  • I have read all of the relevant Picovoice Cobra docs
  • I have searched the existing issues for Cobra

SDK

Node.js

Cobra package version

2.0.0

Framework version

Node v18.19.0

Platform

Raspberry Pi

OS/Browser version

Debian GNU/Linux 12 (bookworm)

Describe the bug

Running the Cobra on the device gives an initialization error. An API key is correctly set up, and the internet connection and USB microphone suppose to work.

The error I am getting that doesn’t make a lot of sense:

/home/rpi/voice-assistant-poc/node_modules/@picovoice/cobra-node/dist/errors.js:76
            throw new CobraIOError(errorMessage, messageStack);
                  ^

CobraIOError: Cobra failed to initialize: 
  [0] Picovoice Error (code `00000136`)
  [1] Picovoice Error (code `00000136`)
    at pvStatusToException (/home/rpi/voice-assistant-poc/node_modules/@picovoice/cobra-node/dist/errors.js:76:19)
    at Cobra.handlePvStatus (/home/rpi/voice-assistant-poc/node_modules/@picovoice/cobra-node/dist/cobra.js:134:46)
    at new Cobra (/home/rpi/voice-assistant-poc/node_modules/@picovoice/cobra-node/dist/cobra.js:59:18)
   ...{
  _message: 'Cobra failed to initialize',
  _messageStack: [
    'Picovoice Error (code `00000136`)',
    'Picovoice Error (code `00000136`)'
  ]
}

Steps To Reproduce

  1. this.cobra = new Cobra(apiKey)
  2. Error

Expected Behavior

The error message gives more details, or the error code is described in Picovoise documentation.

About this issue

  • Original URL
  • State: open
  • Created 3 months ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Can you try the simple capture example to see if you can record audio, since that is how PvRecorder will be used?

As well, please also try our file demo so we can see if Cobra can initialize.

Here’s how you can run the examples:

  1. clone the miniaudio repo and cd into the examples directory
  2. run the command from their README (either one under Examples. You may have to change some paths based on your file structure.)
  3. run the output file with with the path to an existing audio file on your device. If working, you’ll hear the audio being played out of your speakers.

If this doesn’t work, it would be helpful if you could try our file demo and see if that works.