Skip to main content

Bat Spoken Language Identification Engine.

Project description

Bat Binding for Python

Bat Spoken Language Identification Engine

Made in Vancouver, Canada by Picovoice

Bat is an on-device spoken language identification 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.2.tar.gz (7.3 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.2-py3-none-any.whl (7.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pvbat-1.0.2.tar.gz
  • Upload date:
  • Size: 7.3 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.2.tar.gz
Algorithm Hash digest
SHA256 f645ee38221b72da8e7c44c2816ad27f27a45ddb39a04c9fa4178437e1337bae
MD5 9c70b9cbc57becc1e522216399870bb6
BLAKE2b-256 dadcae7b33243f75c50c225e6ab592846daff16ce0a131b6aa34a14348318954

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pvbat-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e16470d5b544f4cbfad76aad6ec6a0dcc3664c78d71e659350ee4155bccc170
MD5 bc5945d03bf79565473dfd507f8c70a1
BLAKE2b-256 401af0a31c510c343c0210e2a9915bc311c303e1441a4454332697a2ebc6c583

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