speech_to_text
7.5.0, released 2 months ago by csdcorp.com
Flutter plugin to expose device-specific speech-to-text recognition capabilities.
What it does
Exposes device-specific speech recognition capabilities in Flutter. It allows capturing spoken words from the microphone and converting them to text via platform APIs.
AI-written summary of version 7.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to implement voice commands or short phrase recognition in your app.
- You need cross-platform speech-to-text support across Android, iOS, macOS, Windows, and Web.
Skip it when
- You need continuous spoken conversion or always-on listening.
- You are targeting Linux (not supported).
Strengths
- Supports multiple platforms including Android, iOS, macOS, Web, and Windows.
- Provides callback handlers for results, status changes, and errors.
Weaknesses
- Android has a very short built-in pause timeout that cannot be customized.
- Windows support is currently in beta and not yet fully production-ready.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 6
Requires platform-specific permissions like microphone access and speech recognition descriptions in Info.plist (iOS/macOS) and AndroidManifest.xml (Android).
import 'package:speech_to_text/speech_to_text.dart' as stt;
stt.SpeechToText speech = stt.SpeechToText();
bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
if (available) {
speech.listen(onResult: resultListener);
} else {
print("The user has denied the use of speech recognition.");
}Alternatives
Packages that do the same job and could replace speech_to_text.
- flutter_tts
A Flutter plugin for text-to-speech support across multiple platforms.
69Compare - stts
Speech-to-Text and Text-to-Speech Flutter plugin with offline-first capabilities.
72Compare - sherpa_onnx
On‑device Flutter library for speech recognition, synthesis, speaker and audio tagging functions.
83Compare - flutter_screen_recording
Record device screen on Android, iOS, and web with optional audio.
71Compare
Works with
Packages commonly used together with speech_to_text: ones it builds on, ones built on it, and its own family.
- webspeech_to_text depends on itLightweight bindings for browser APIs via JS interop
- clockspeech_to_text depends on itA fakeable wrapper for dart:core clock APIs.
- json_annotationspeech_to_text depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- speech_to_text_platform_interfacespeech_to_text depends on itA common platform interface for the speech_to_text plugin.