Skip to main content

Bat Spoken Language Understanding Engine.

Project description

Bat Binding for Python

Bat Spoken Language Understanding Engine

Made in Vancouver, Canada by Picovoice

Bat is an on-device spoken language understanding engine. Bat is:

  • Private; All voice processing runs locally.
  • Cross-Platform:
    • Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
    • Android and iOS
    • Chrome, Safari, Firefox, and Edge
    • Raspberry Pi (3, 4, 5)

Compatibility

  • Python 3.9+
  • Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

Installation

pip3 install pvbat

AccessKey

Bat requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Bat 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 and detect the spoken language from an audio stream.

import pvbat

handle = pvbat.create(access_key='${ACCESS_KEY}')

def get_next_audio_frame():
    pass

while True:
    language_scores = handle.process(get_next_audio_frame())
    if language_scores:
        print(language_scores)

Replace ${ACCESS_KEY} with yours obtained from Picovoice Console. When done be sure to explicitly release the resources using handle.delete().

Demos

pvbatdemo provides command-line utilities for processing audio using Bat.

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

pvbat-1.0.0.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pvbat-1.0.0-py3-none-any.whl (7.2 MB view details)

Uploaded Python 3

File details

Details for the file pvbat-1.0.0.tar.gz.

File metadata

  • Download URL: pvbat-1.0.0.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pvbat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c1b5e53a973491507bbaaa91d6fefce5e1d6cf92b47e76312645758445366ec7
MD5 a2960c787b91a66887e6cffd823744c4
BLAKE2b-256 7748d5e4fd24ab20e29458edb6d8304e9963a7da62dafdc5e4aa10d8459b0068

See more details on using hashes here.

File details

Details for the file pvbat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pvbat-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pvbat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 250bfcb5bd867dca5235b17c9c1a8c7f62ab1af19dd04ebd66de417d27f2f5c1
MD5 de93587ee39739721f042ca6be2e27f3
BLAKE2b-256 723f05ed38c7d5b663e6e748bef4bd1cb2929822a38d03eb4dfe202047c16537

See more details on using hashes here.

Supported by

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