Building an offline speech-to-text app with Flutter, FFI, whisper.cpp and FFmpeg
Description and use
Extracter turns any audio or video file into text entirely on the device, using Flutter, FFmpeg, and whisper.cpp, ensuring offline privacy.
Problem
Transcribing audio or video locally without uploading to cloud services.
Outcome
Extracter delivers line‑by‑line transcripts for any audio/video file on Android, iOS, and macOS, with no network usage after model download.
Workflow
- Select audio/video file
- FFmpeg decodes to 16 kHz mono PCM
- Whisper.cpp processes 30‑second windows fed in ~3‑minute chunks
- Native FFI plugin posts events (progress, segment, logs, DONE) to Dart
- Flutter UI streams segments line‑by‑line
- User can view history, export to TXT/SRT/VTT, or copy text
Evidence
Cloud transcription is convenient until you have a recording you'd rather not upload: a lecture, a client call, a voice note.
Extracter, an open‑source Flutter app that turns any audio or video file into text entirely on the device.
The heavy lifting lives in a small FFI plugin, extracter_native, with one C ABI shared by every platform:
The app crashed with SIGSEGV, and the backtrace pointed at the line where the worker called the callback.
Posting to the port of a dead isolate just returns false, so nothing crashes.
- Record date: 2026-10-22T09:11:23.743Z