Offline speech-to-text for Flutter, with no server and no API key
Description and use
The transcribe_cpp package enables real‑time speech‑to‑text on iOS and Android devices locally, without network, servers, or API keys, offering privacy and high speed.
Problem
Developers need real‑time transcription on mobile devices without relying on cloud APIs, network, accounts, or API keys.
Outcome
The package delivers fast, private, live transcription on mobile devices, handling phone calls, background execution, and varying audio sources without external dependencies.
Workflow
- Add transcribe_cpp to pubspec:
flutter pub add transcribe_cpp - Import the package and download a model once:
final models = await ModelManager.open(); final model = await models.ensure(const ModelId('parakeet-tdt_ctc-110m-Q4_K_M')); - Open a session and start listening:
final session = await TranscribeSession.open(model); await session.start(); - Display live text via a ValueListenableBuilder on
session.text.full - Stop the session with
await session.stop(); - If audio is already captured, transcribe it with
await session.transcribeStream(myAudio, format: const AudioFormat(sampleRate: 48000));
Evidence
It works in airplane mode.
Fast. On a mid‑range phone, the recommended model transcribes speech about 40 times faster than real time.
The model I recommend is NVIDIA's Parakeet 110M: a 90 MB download with a 2.5% word error rate on the LibriSpeech benchmark.
The package re‑reads the unfinished sentence every 350 ms to avoid flicker.
The package runs Silero VAD, a small voice‑detection model I ported to plain C, and an endpointer tuned by measuring, not by feel.
- Record date: 2026-10-22T13:11:35.548Z