Cheetah Speech-to-Text
Android Quick Start
Platforms
- Android (5.0+)
Requirements
- Picovoice Account and AccessKey
- Android Studio
- Android device with USB debugging enabled or Android simulator
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey.
Make sure to keep your AccessKey secret.
Quick Start
Setup
Install Android Studio.
Include
mavenCentral()repository in the top-levelbuild.gradle. Then add the following to the app'sbuild.gradle:
- Add the following to the app's
AndroidManifest.xmlfile to enable recording with an Android device's microphone:
Model File
Add the Cheetah Streaming Speech-to-Text model file to your Android application:
- Create a custom model using the Picovoice Console or use the default model.
- Add the model as a bundled resource by placing it under the
${ANDROID_APP}/src/main/assetsdirectory of your Android project.
Usage
Create an instance of the engine with the Cheetah Streaming Speech-to-Text Builder by passing in your AccessKey, model file and the Android app context:
Transcribe real-time audio:
When done, release resources explicitly:
Non-English Languages
In order to use Cheetah with other languages, you need to use the corresponding model file (.pv) for the desired language.
The model files for all supported languages are available on the Cheetah GitHub repository.
Demo
For the Cheetah Streaming Speech-to-Text Android 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
Clone the Cheetah Streaming Speech-to-Text repository from GitHub using HTTPS:
Usage
- Open the Android demo using Android Studio.
- Copy your
AccessKeyfrom Picovoice Console into theACCESS_KEYvariable in MainActivity.java. - Run the application using a connected Android device or using an Android simulator.
Resources
Package
API
GitHub
- Cheetah Streaming Speech-to-Text Android SDK on GitHub
- Cheetah Streaming Speech-to-Text Android demo on GitHub