LOCAL_WHISPER backend is defined in config but has no implementation #2
Labels
No labels
blocked:children
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
deferred
enhancement
feature-request
in-progress
needs-decompose
needs-triage
quickfix
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/transcriber#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
SpeechBackendType.LOCAL_WHISPERis defined as an enum value and its prerequisite check exists inSpeechBackend.checkPrerequisites()(checks for a model file atfilesDir/models/ggml-small.bin), but there is no actualLocalWhisperTranscriptionProviderimplementing theTranscriptionProviderinterface.This means:
LOCAL_WHISPERin their priority order and the model file exists,SpeechBackend.select()will return it as availableTranscriptionService.kthas no code path to instantiate or use a local Whisper providerRevised Implementation Spec
Architecture
Create a proper on-device Whisper transcription engine using whisper.cpp via JNI. This gives us on-device transcription with no API costs, working fully offline.
What to Build
1. JNI Bridge Layer (
app/src/main/cpp/whisper_jni.cpp)whisper_init_from_file()nativeInit(modelPath: String): BooleannativeTranscribe(audioFile: String, numThreads: Int): StringnativeRelease()libwhisper_jni.sofor armeabi-v7a, arm64-v8a, x86_642. Provider Class (
LocalWhisperTranscriptionProvider.kt)TranscriptionProviderinterfacerecognize(audioFile: File): TranscriptionResult3. Model Download (
ModelDownloadManager.kt)filesDir/models/ggml-small.binmissing, show download prompthttps://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.binRangeheader4. Wiring
TranscriptionService.kt: addSpeechBackendType.LOCAL_WHISPER→LocalWhisperTranscriptionProviderSpeechBackend.checkPrerequisites(): already implemented — verify model exists and .so loadsFiles Changed
app/src/main/cpp/whisper_jni.cppapp/CMakeLists.txtapp/src/main/java/.../service/LocalWhisperTranscriptionProvider.ktapp/src/main/java/.../service/ModelDownloadManager.ktapp/build.gradle.ktsapp/.../service/TranscriptionService.ktapp/.../service/SpeechBackend.ktFallback Path
If NDK complexity is too high, implement via TensorFlow Lite using a TFLite Whisper model (smaller, but lower accuracy). The JNI path is preferred for full whisper.cpp accuracy and support, but TFLite is a lighter build dependency.
GSD VERIFY phase failed after 3 attempts.
Conformance failure: Unexpected files modified: .../service/LocalWhisperTranscriptionProvider.kt; Expected files not modified: app/src/main/java/com/voicetranscriber/service/LocalWhisperTranscriptionProvider.kt, app/src/main/java/com/voicetranscriber/service/SpeechBackend.kt, app/src/main/java/com/voicetranscriber/service/TranscriptionService.kt