Skip to main content

Cobra voice activity detection (VAD) engine

Project description

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
  • Runs on Linux (x86_64), macOS (x86_64), Windows (x86_64), Raspberry Pi, NVIDIA Jetson (Nano), and BeagleBone.

Installation

pip3 install pvcobra

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pvcobra-1.0.7.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

pvcobra-1.0.7-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file pvcobra-1.0.7.tar.gz.

File metadata

  • Download URL: pvcobra-1.0.7.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pvcobra-1.0.7.tar.gz
Algorithm Hash digest
SHA256 554faa0553867b3670802850cc219c1c47188ed8c7f0b8005eab44120c8389e3
MD5 858a7cc1bc1921583d10bea485f610a7
BLAKE2b-256 f8a1b638aea5f46a56d71eaaf75f32e9b5a72146517cb23334fa1c393b4337d3

See more details on using hashes here.

File details

Details for the file pvcobra-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: pvcobra-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pvcobra-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3016dd3d99ad0aedf5a995f4bcfaf2c7213d5a45e4d36b7794d9eea9a6a99e6f
MD5 176b9f188e3ea2cab638755e93fdf347
BLAKE2b-256 958a8bee9476fddeeaf3b53d8cd69bc0debc9454b7c81cd3f0c2e3f2a5d2cd27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page