Cobra Voice Activity Detection Engine
Made in Vancouver, Canada by Picovoice
Cobra is a highly accurate and lightweight voice activity detection (VAD) engine.
Compatibility
- Python 3.9+
- Runs on Linux (x86_64), macOS (x86_64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).
Installation
pip3 install pvcobra
AccessKey
Cobra requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Cobra SDKs.
You can get your AccessKey for free. Make sure to keep your AccessKey secret.
Signup or Login to Picovoice Console to get your AccessKey.
Usage
Create an instance of the engine
import pvcobra
handle = pvcobra.create(access_key=${AccessKey})
Replace ${AccessKey} with your AccessKey obtained from Picovoice Console. handle is
an instance of Cobra.
When initialized, the valid sample rate is given by handle.sample_rate. Expected frame length (number of audio samples
in an input array) is handle.frame_length. The engine accepts 16-bit linearly-encoded PCM and operates on
single-channel audio.
def get_next_audio_frame():
pass
while True:
voice_probability = handle.process(get_next_audio_frame())
When done, resources have to be released explicitly:
handle.delete()
Demos
pvcobrademo provides command-line utilities for processing real-time audio (i.e. microphone) and files using Cobra.
Metadata
Release files for pvcobra 3.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pvcobra-3.0.3.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pvcobra-3.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 MB
Release files / pvcobra-3.0.3.tar.gz
| Download URL | pvcobra-3.0.3.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cef39ee5f915ef2422d36f7d65423702a851e2a53f4b4c7444f0d45e00c1ebee
|
|
BLAKE2b-256 checksum How to use checksums |
895f255c0793c8095f671e90be2ddbb7bb5bde4bfe37ba445c9edbe816554473
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / pvcobra-3.0.3-py3-none-any.whl
| Download URL | pvcobra-3.0.3-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63adeb59417f3cf243f29bab4233251ec2b66919b0a31c317e5ef6dec9f65df4
|
|
BLAKE2b-256 checksum How to use checksums |
60c22fc5c72dc0235326afde7424e0b26c425049b782a34c523e6b09440d5d45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|