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

Uploaded Source

Built Distribution

pvcobra-1.0.2-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pvcobra-1.0.2.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.10

File hashes

Hashes for pvcobra-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f31965cfe8e618b21f94335d6049c82d2b7161ca3e0d6e6adde55b3a3b1fc4ca
MD5 81192c5a59911a1a5b00840aa75a5783
BLAKE2b-256 43e2df2feefd0017ac7a3be08f05834dffe7998b410357ac242cc28d4279d3f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pvcobra-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.10

File hashes

Hashes for pvcobra-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 86356566a775db08253aaac4fbbed24dc97fb4ad09f4787272522f046fa84a90
MD5 ffae7b8f530302e9d649ede1a7966dbc
BLAKE2b-256 7f20b6718bbd9685e858f6cf30d1e132b17e8682b2ac8580cd2f652436b29600

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