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 Streaming Speech-to-Text 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:
Model File
Add the Cheetah Streaming Speech-to-Text 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 Streaming Speech-to-Text
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 Streaming Speech-to-Text Flutter SDK, we offer demo applications that demonstrate how to use the Speech-to-Text engine on audio recordings.
Setup
Clone the Cheetah Streaming Speech-to-Text 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 Streaming Speech-to-Text demos for Flutter, head over to our GitHub repository.
Resources
Package
API
GitHub
- Cheetah Streaming Speech-to-Text Flutter SDK on GitHub
- Cheetah Streaming Speech-to-Text Flutter demo on GitHub