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

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.

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.1.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

pvcobra-1.1.2-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pvcobra-1.1.2.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for pvcobra-1.1.2.tar.gz
Algorithm Hash digest
SHA256 6289cb093f093f5706d1d73c3d8d5a6f3be4bfe705d19e8bfbcc21c70b3f57e9
MD5 db711c3d5fc0fedf539a6b44bc8d8ae4
BLAKE2b-256 533dde9b9d5eb03863dbafd9beb9802251c648ea5b8ba0682dc4494865ee7e8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pvcobra-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for pvcobra-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c7500a5fa499b829448c469c0fa00871a8d2884ca9493d3a8518b3e7ac3e0e7b
MD5 96e53de60e178a6120a9bd18498c532e
BLAKE2b-256 df665ef7ee5ccbf505410b205077a0a64c36a2aace83c46d46b02be6e5c2a178

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