Cheetah - Python Quick Start
Platforms
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- NVIDIA Jetson Nano
- Raspberry Pi (3, 4)
Requirements
- Picovoice Account & AccessKey
- Python 3
- PIP
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey
.
Make sure to keep your AccessKey
secret.
Quick Start
Setup
Install Python 3.
Install the pvcheetah Python package using PIP:
pip3 install pvcheetah
Usage
Create an instance of the engine and transcribe audio:
import pvcheetahcheetah = pvcheetah.create(access_key='${ACCESS_KEY}')def get_next_audio_frame():passwhile True:partial_transcript, is_endpoint = cheetah.process(get_next_audio_frame())if is_endpoint:final_transcript = cheetah.flush()
Free resources used by Cheetah
:
cheetah.delete();
Demo
For the Cheetah Python SDK, we offer demo applications that demonstrate how to use the Speech-to-Text engine on real-time audio streams (i.e. microphone input).
Setup
Install the pvcheetahdemo Python package using PIP:
pip3 install pvcheetahdemo
This package installs command-line utilities for the Cheetah Python demos.
Usage
Use the --help
flag to see the usage options for the demo:
cheetah_demo_mic --help
Run the following command to transcribe an audio file:
cheetah_demo_mic --access_key ${ACCESS_KEY}
For more information on our Cheetah demos for Python, head over to our GitHub repository.