Cobra VAD — Python Quick Start
Platforms
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64, arm64)
- Raspberry Pi (Zero, 3, 4, 5)
Requirements
- Picovoice Account & AccessKey
- Python 3.9+
- PIP
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey.
Make sure to keep your AccessKey secret.
Quick Start
Setup
Install Python 3.
Install the pvcobra Python package using PIP:
Usage
Create an instance of the Cobra Voice Activity Detection engine:
Pass in frames of audio to the .process function:
Release resources explicitly when done with Cobra Voice Activity Detection:
Demo
For the Cobra Voice Activity Detection Python SDK, we offer demo applications that demonstrate how to use the VAD engine on real-time audio streams (i.e. microphone input) and audio files.
Setup
Install the pvcobrademo Python package using PIP:
This package installs command-line utilities for the Cobra Voice Activity Detection Python demos.
Usage
Use the --help flag to see the usage options for the demo:
Ensure you have a working microphone connected to your system and run the following command to detect voice activity:
For more information on our Cobra Voice Activity Detection demos for Python, head over to our GitHub repository.
Resources
Packages
API
GitHub
- Cobra Voice Activity Detection Python SDK on GitHub
- Cobra Voice Activity Detection Python Demos on GitHub