whisper_ggml
2.10.0, released 4 days ago by antonkarpenko.com
On-device speech-to-text for Flutter powered by whisper.cpp
What it does
Provides on-device automatic speech recognition (ASR) using Whisper models via whisper.cpp. Supports both one-off audio file transcription and live streaming transcription with optional VAD and speaker-turn detection.
AI-written summary of version 2.9.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need completely offline speech-to-text without cloud APIs or keys.
- You want live streaming speech transcription in a Flutter app.
- You need voice activity detection (VAD) or basic speaker diarization.
Skip it when
- You require cloud-based speech recognition services with massive pre-trained language vocabularies.
- You cannot accept the app bundle size increase from including or downloading Whisper model weights.
Strengths
- Fully offline, local execution with no server dependency.
- Supports live streaming transcription with partial results.
- Fast native performance utilizing whisper.cpp with hardware acceleration.
Weaknesses
- Requires managing large model files (from tens of megabytes to gigabytes).
- Platform configuration required for native builds and minimum OS targets (e.g. iOS 15.6).
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 7
Requires setting the iOS deployment target to 15.6 or later in Podfile and Xcode. On Windows and Linux, FFmpeg must be installed on PATH if non-WAV audio files are processed.
import 'package:whisper_ggml/whisper_ggml.dart';
final controller = WhisperController();
final result = await controller.transcribe(
model: WhisperModel.tiny,
audioPath: '/path/to/audio.wav',
lang: 'en',
);
print(result?.transcription.text);Alternatives
Packages that do the same job and could replace whisper_ggml.
- vosk_flutter_service
Flutter plugin for offline speech recognition using Vosk toolkit.
70Compare - whisper_ggml_plus
On-device Whisper.cpp speech transcription plugin for Flutter.
57Compare - ml_algo
Native Dart implementation of machine learning algorithms and performance evaluation tools.
82Compare - whisper_flutter_new
Use whisper.cpp speech-to-text models implementation for Android and iOS
50Compare
Works with
Packages commonly used together with whisper_ggml: ones it builds on, ones built on it, and its own family.
- ffiwhisper_ggml depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- json_annotationwhisper_ggml depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- plugin_platform_interfacewhisper_ggml depends on itReusable base class for platform interfaces of Flutter federated plugins.
- path_providerwhisper_ggml depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- freezed_annotationwhisper_ggml depends on itAnnotations for the freezed code-generator.
- universal_iowhisper_ggml depends on itCross-platform dart:io implementation with browser support for HttpClient and other APIs
- ffmpeg_kit_flutter_new_minwhisper_ggml depends on itRun FFmpeg and FFprobe commands from Dart on Android, iOS, macOS, Windows, and Linux.