whisper_ggml 2.0.0
whisper_ggml: ^2.0.0 copied to clipboard
OpenAI Whisper ASR (Automatic Speech Recognition) for Flutter
2.0.0 #
- Upgraded the vendored whisper.cpp from a 2023-era snapshot to v1.9.1 — roughly 15× faster transcription (an 11-second clip takes ~0.4 s with the
basemodel on Apple Silicon), with Accelerate enabled on iOS/macOS - The model-loading code that crashed on some physical iPhones was rewritten upstream (#22); verified working on the iOS simulator
- Removed the
-march=armv8.2-a+fp16Android compile flags that caused SIGILL crashes on armv8.0 devices (#15) - Native code now compiles with
-O3in debug builds on iOS/macOS, so development-time transcription is no longer unusably slow - Rewrote the README
- Note: while the Dart API is unchanged, the native engine swap is significant — hence the major version bump
1.9.2 #
- Removed the
windowsandlinuxplatform declarations — neither has a native whisper implementation, and pub.dev advertised support that failed at runtime. Unsupported platforms now throw a clearUnsupportedError(#20) - Ship consumer ProGuard rules so Android release builds no longer strip the bundled ffmpeg-kit classes, which broke plugin registration and surfaced as
channel-erroron unrelated plugins like path_provider (#16)
1.9.1 #
- Fixed a native crash (SIGABRT) when whisper emits text containing invalid UTF-8 — e.g. a token boundary splitting a multi-byte character, common with non-English audio. Invalid bytes are now replaced with U+FFFD instead of aborting the app (#21)
1.9.0 #
- Added live (streaming) transcription:
WhisperController.transcribeLivetakes a stream of 16 kHz mono PCM16 audio and returns aWhisperLiveSessionthat emits progressively refined partial transcripts while the user speaks;stop()returns the final text - Live sessions load the model once and keep it in memory (new native
stream_start/stream_feed/stream_stopAPI on Android, iOS, and macOS); inference runs on a dedicated isolate and never blocks the UI - Adaptive energy gate keeps silence — digital or room tone — away from the decoder, preventing
[BLANK_AUDIO]markers and hallucinated repetition; tunable per session viagateRmsMin,gateVoiceRatio, andgateNoiseFloorCap - Added
suppressNonSpeechTokensparameter (whisper_full_params.suppress_non_speech_tokens) toTranscribeRequest,transcribe, andtranscribeLive - Fixed a native memory leak: FFI response buffers were never freed — one small leak per one-shot transcription, unbounded growth for streaming
- Example app: redesigned UI with dedicated Live and Record microphone buttons and a JFK sample button; live transcripts update on screen while speaking
- Fixed macOS example: added the missing microphone entitlement
1.8.0 #
- Added
initialPromptparameter toTranscribeRequestandWhisperController.transcribe - Wired
initial_promptthrough towhisper_full_params.initial_prompton Android, iOS, and macOS to bias decoding toward domain-specific vocabulary, names, and punctuation - Added
noContextparameter (whisper_full_params.no_context, equivalent to Python whisper'scondition_on_previous_text=False) on Android, iOS, and macOS to disable cross-segment text conditioning — helps against hallucinated repetition on short utterances - Empty / null prompt and
noContext: falseleave whisper.cpp defaults, so existing callers see no behaviour change - Removed unused
flutter_riverpoddependency, which was constraining consumers to riverpod 2.x even though the package never imported it - Fixed example app crash on macOS when transcribing the bundled jfk.wav (temporary directory did not exist)
1.7.0 #
- Connected
diarizetranscribe parameter to the underlying whisper C++ code - Added
diarizeparameter to thetranscribemethod
1.6.0 #
- Fixed iOS issues
- Added
autolanguage support for iOS - Fixed
exampleproject - Increased NDK version in order to support Google 16 KB requirement
1.5.0 #
- Switched main FFmpeg from heavy
ffmpeg_kit_flutter_new: ^1.6.1to lightweightffmpeg_kit_flutter_new_min: ^2.1.0 - Upgraded
recorderdependency forexampleproject fromv5.2.1tov6.0.0 - Updated main code files
1.4.0 #
- Added ability to use "auto" language detection
- Upgraded
pubspec.yamldependencies
1.3.0 #
- Upgraded Android bindings to work with Flutter 3.29
- Added new FFmpeg kit dependency
1.2.0 #
- Fixed Android v1 embedding issue by adding override for ffmpeg_kit_flutter_full_gpl
- Upgraded dependencies
1.1.1 #
- Cleaned up code
1.1.0 #
- Added support for MacOS
1.0.0 #
- Added support for Android and iOS