Skip to main content

Cheetah Speech-to-Text Engine.

Project description

Cheetah Binding for Python

Cheetah Speech-to-Text Engine

Made in Vancouver, Canada by Picovoice

Cheetah is an on-device streaming speech-to-text engine. Cheetah is:

  • Private; All voice processing runs locally.
  • Accurate
  • Compact and Computationally-Efficient
  • 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 pvcheetah

AccessKey

Cheetah requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Cheetah 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 transcribe audio:

import pvcheetah

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

def get_next_audio_frame():
    pass

while True:
    partial_transcript, is_endpoint = handle.process(get_next_audio_frame())
    if is_endpoint:
        final_transcript = handle.flush()

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

Language Model

The Cheetah Python SDK comes preloaded with a default English language model (.pv file). Default models for other supported languages can be found in lib/common.

Create custom language models using the Picovoice Console. Here you can train language models with custom vocabulary and boost words in the existing vocabulary.

Pass in the .pv file via the model_path argument:

cheetah = pvcheetah.create(
    access_key='${ACCESS_KEY}',
    model_path='${MODEL_FILE_PATH}')

Demos

pvcheetahdemo provides command-line utilities for processing audio using Cheetah.

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

pvcheetah-2.2.1.tar.gz (32.5 MB view details)

Uploaded Source

Built Distribution

pvcheetah-2.2.1-py3-none-any.whl (32.5 MB view details)

Uploaded Python 3

File details

Details for the file pvcheetah-2.2.1.tar.gz.

File metadata

  • Download URL: pvcheetah-2.2.1.tar.gz
  • Upload date:
  • Size: 32.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for pvcheetah-2.2.1.tar.gz
Algorithm Hash digest
SHA256 d4eeb03d0a5ee1f88bcc010e94b2fe626284cb15ffeb3570902ba868ff7d42ae
MD5 bb0b96bf71d9e886d447d447d9c51c65
BLAKE2b-256 ccbcf6ac5b03cc0f9b15df873d7ebd9496d3d6866aed13efb0c8d915ad583863

See more details on using hashes here.

File details

Details for the file pvcheetah-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: pvcheetah-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 32.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for pvcheetah-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f37642e1f039609aa96d8eedcd8db548f0ceff46b89acb5b99c25e8456c1ed8
MD5 febeba8ddfe27c488a854b136878107a
BLAKE2b-256 c25f4cb74a4f2652a34d7e43c1ea92b2dc38b987a027dc25ea3404ed103a2f31

See more details on using hashes here.

Supported by

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