Cheetah Speech-to-Text
Flutter Quick Start
Platforms
- Flutter (2.8.1+)
- Android (5.0+, API 21+)
- iOS (13.0+)
Requirements
- Flutter SDK
- Android SDK (21+)
- JDK (8+)
- Xcode (13+)
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey
.
Make sure to keep your AccessKey
secret.
Quick Start
Setup
Install Flutter SDK.
Run
flutter doctor
to determine any missing requirements.Add the Cheetah plugin to your app project by referencing it in
pubspec.yaml
:
- Enable the proper permissions for recording with the hardware's microphone on both iOS and Android:
iOS
Open your Info.plist
and add the following line:
Android
Open your AndroidManifest.xml
and add the following line:
Cheetah Model File Integration
Add the Cheetah model file to your Flutter application:
- Create a model in Picovoice Console or use the default model.
- Add the model file to an
assets
folder in your project directory. - Add the asset to your
pubspec.yaml
:
- In this example, the path to the model file in code would then be as follows:
Usage
An instance of Cheetah
is created by passing a model file path into its static constructor create
:
Transcribe audio:
When done, resources have to be released explicitly:
Demo
For the Cheetah Flutter SDK, we offer demo applications that demonstrate how to use the Speech-to-Text engine on audio recordings.
Setup
Clone the Cheetah repository from GitHub using HTTPS:
Usage
Replace
{YOUR_ACCESS_KEY_HERE}
with a validAccessKey
in the demo/flutter/lib/main.dart file:Copy assets:
NOTE: on Windows, Git Bash or another bash shell is required, or you will have to manually copy the cheetah demo model file
- Build and deploy the demo to your device:
For more information on our Cheetah demos for Flutter, head over to our GitHub repository.