picovoice / cobra Goto Github PK
View Code? Open in Web Editor NEWOn-device voice activity detection (VAD) powered by deep learning
Home Page: https://picovoice.ai/
License: Apache License 2.0
On-device voice activity detection (VAD) powered by deep learning
Home Page: https://picovoice.ai/
License: Apache License 2.0
Cobra stops working when porcupine service in installed and used in angular
getting this error
core.mjs:6494 ERROR Error: Uncaught (in promise): Error: 'pv_cobra_init' failed with status IO_ERROR
at resolvePromise (zone.js:1211:1)
at zone.js:1118:1
at asyncGeneratorStep (asyncToGenerator.js:6:1)
at _throw (asyncToGenerator.js:29:1)
at _ZoneDelegate.invoke (zone.js:372:1)
at Object.onInvoke (core.mjs:25608:1)
at _ZoneDelegate.invoke (zone.js:371:1)
at Zone.run (zone.js:134:1)
at zone.js:1275:1
at _ZoneDelegate.invokeTask (zone.js:406:1)
when working with only cobra VAD it works fine, but once i installed porcupine service it stops working
Expected an ELF format file of approximately the same size as other shared libraries.
This file shrank by about half since the previous version, and does not appear to be an ELF file at all.
Is your feature request related to a problem? Please describe.
I am using python library to detect voice activity in audio file. but we are going to receive input from stream and it is going to be 8000hz single channel audio. But when I try to test with audio of 8khz sampling rate then library fails because it is not 16000hz rate.
Describe the solution you'd like
Please provide option to set sampling rate for input file.
Additional context
Audio stream will be coming from twilio and we do not have control on the frequency they provide, it is always going to be 8000hz single channel audio. But here we want to use picovoice cobra for activity detection but it is not supported.
iOS
2.0.1
EXPO CLI 0.17.8
iOS
N/A
I use your example of Cobra for IOS . It works however I keep getting endless warning messages:
"WARN Sending frame_sent
with no listeners registered."
On android it works fine.
It is reproducible on my environment. On simulator and real devices. Just run the IOS example and watch terminal console for messages.
Not to receive the warning messages ""WARN Sending frame_sent
with no listeners registered." or a better message that explains where this is in the stack etc'
Hi there,
can VAD be ran offline without the need of access keys, etc..
will the models be released publicly
Is your feature request related to a problem? Please describe.
CobraError
does not implement the standard std::error::Error
trait, which means that the use of the ?
syntax in Result
returning functions is not available.
Describe the solution you'd like
Implement std::error::Error
for CobraError
. As the type already implements Display
, it may literally be as simple as adding impl std::error::Error for CobraError {}
, and relying on the provided functions - possibly a literal one-liner.
Describe alternatives you've considered
It is possible to workaround this by simply mapping the error, but it's a shame to need to, and a pity for a small and otherwise quite ergonomic library (although some more Rust-like changes to the API would be possible).
Additional context
n/a
Is your feature request related to a problem? Please describe.
Very much in need of vad detection technology, but using the go sdk, which I've found that TEAM doesn't provide at the moment!
Describe the solution you'd like
Provide golang sdk
Describe alternatives you've considered
I checked the sdk for the other go parts in the pico voice project, most of them are based on the cgo packaging, and currently cobra has c support, can you quickly convert it to cgo and add go support, but since I don't know c I can't do it to provide pr
Is your feature request related to a problem? Please describe.
Not really.
Describe the solution you'd like
A more easy to implement SDK for the Unity Game Engine.
Describe alternatives you've considered
I can probably just write the plugins my self, I just have no idea how too.
Node.js
2.0.0
Node v18.19.0
Raspberry Pi
Debian GNU/Linux 12 (bookworm)
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`)'
]
}
The error message gives more details, or the error code is described in Picovoise documentation.
Hello Picovoice Team!
After testing with Cobra, I have found the following:
The performance of Cobra decreases gradually and the voice becomes harder to recognize when I divide the signal into smaller portions. This makes it difficult for us to determine a fixed volume level for Cobra to operate most effectively because the signal volume from the microphone is constantly changing. Is this a bug or is it normal?
Below is a chart showing the VAD output of the original signal and the signal divided by 10.
Thank you.
https://picovoice.ai/docs/quick-start/cobra-python/
Hi, I need to check if mp3 and .wav files contain a human speech in order to ignore music or noise files. I need a quick check.
Unfortunately, your documentation does not explain how to work with files. Can you help me ?
Cordially.
Thank you.
Hello Piovoice team. This issue is a continuation of the feedback from issue #141. Here I have a recording used by the high-end Zoom H8 Audio Recorder and the audio file is also of high quality with full higher content frequency. Similar to the experiment above, after dividing the samples into 10 parts, I noticed that the result of Picovoice Cobra had changed. I think you can also test and verify the results through my wave file:
Below is a chart showing the VAD output of the original signal and the signal divided by 10:
I am looking forward to your feedback and how to fix it. Thank you so much.
Is there any doc for flutter or any implementation in progress? Would be awesome.
I am attempting to utilize the package in order to create a DaVinci voice assistant using a Raspberry Pi 5. I am getting the following error when trying to start DaVinci. I posted on their issues section as well, but I see that the issue is with pvcobra specifically, so I came here.
The error:
Traceback (most recent call last):
File "/home/ty/DaVinci/DaVinci.py", line 8, in
import pvcobra
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/init.py", line 12, in
from ._factory import *
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_factory.py", line 15, in
from ._util import *
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_util.py", line 64, in
_PV_SYSTEM, _PV_MACHINE = _pv_platform()
^^^^^^^^^^^^^^
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_util.py", line 57, in _pv_platform
pv_machine = _pv_linux_machine(platform.machine())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_util.py", line 48, in _pv_linux_machine
raise NotImplementedError('Unsupported CPU.\n%s' % cpu_info)
NotImplementedError: Unsupported CPU.
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
Revision : d04170
Serial : 28a0b219c4dec773
Model : Raspberry Pi 5 Model B Rev 1.0
Hello Picovoice Team.
Currently, I am using Picovoice Cobra to detect voice from a walkie-talkie signal. Is there any way to improve the performance of Cobra? i noticed that the VAD flag is not set in cases where there is noise interference, specifically in this case, noise from the walkie-talkie signal. Could you give me some advice on how to address this issue? Could the interference from the walkie-talkie be disrupting the signal processing of Cobra?
Attached is the WAV file we recorded. voice_with_noise
Tks so much!
Make sure you have read the documentation, and have put forth a reasonable effort to find an existing answer.
after installing the sdk and trying to use it, I'm getting this error:
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module '@picovoice/cobra-web'
Require stack:
(Include enough details so that the issue can be reproduced independently.)
When trying so lunch the cobra_mic_demo using the python sdk and after well installing the package. an error occurs
The normal start of the cobra_demo_mic (probability of speech)
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/pvcobrademo/cobra_demo_mic.py", line 61, in run
cobra = pvcobra.create(
File "/home/pi/.local/lib/python3.9/site-packages/pvcobra/init.py", line 30, in create
return Cobra(library_path=library_path, access_key=access_key)
File "/home/pi/.local/lib/python3.9/site-packages/pvcobra/cobra.py", line 130, in init
raise self._PICOVOICE_STATUS_TO_EXCEPTIONstatus
pvcobra.cobra.CobraActivationError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.local/bin/cobra_demo_mic", line 8, in
sys.exit(main())
File "/home/pi/.local/lib/python3.9/site-packages/pvcobrademo/cobra_demo_mic.py", line 130, in main
CobraDemo(
File "/home/pi/.local/lib/python3.9/site-packages/pvcobrademo/cobra_demo_mic.py", line 95, in run
recorder.delete()
AttributeError: 'NoneType' object has no attribute 'delete'
Launch the commande cobra_demo_mic --access_key TOKEN
on raspbian bullseye 64 system (raspberry pi 4) 2 GB
Is it possible to use Cobra VAD while recording an audio file on Android and IOS? Many other Speech Recognizer have problems with.
Is there any chance of getting a supported version for Node? Thanks!
Hey! Curious if you have plans to make Node.js bindings?
I wrote a websocket server in Node.js that's streaming audio from a phone call via Twilio. I'm currently using WebRTC VAD, but the accuracy is really poor—would love to upgrade to Cobra.
Also, Twilio streams phone calls as μ-law encoded raw audio at an 8kHz sample rate. I've been using the wavefile package to up-sample and reformat the audio, but I'm not sure if that's best practice. If you have any input or suggestions there, it'd be much appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.