Solution (#133): Feature: Add SenseVoice for private local transcription#137
Solution (#133): Feature: Add SenseVoice for private local transcription#137TFGSUMIT wants to merge 1 commit into
Conversation
…cal transcription
LauraGPT
left a comment
There was a problem hiding this comment.
Thanks for working on #133. I checked this head against the repository's actual Android transcription path. This cannot provide a working SenseVoice integration in its current form:
- All four files are created under the literal
path/to/...directory. That directory is not part of any Gradle module or source set. The project includes:shared,:lib, and:core:audio; the existing Android transcription implementation isshared/src/androidMain/kotlin/com/module/notelycompose/platform/Transcriper.android.kt. As written, the app build will not see any of this PR's code. SenseVoice.ktis not a native Kotlin implementation.AutoModel(model = ..., vad_model = ...)is the Python FunASR API and no such Kotlin class or runtime dependency is added here. Other expressions, including constructingStringfromArray<Int>, would also fail compilation if the file were moved into a real source set.- The added manifest is not valid project wiring: it starts with a
//comment, uses placeholder package/resources, adds a second launcher activity, and exports a microphone service to other apps. It also omits the required recording/foreground-service permission and lifecycle handling. - The runtime path cannot return usable transcription to NotelyVoice. It constructs a model for every 1,024-byte audio chunk, ignores
AudioRecord.read()results, overwrites a fixed file under/sdcard, and never connects results to the existingTranscribercallbacks, model selection/download flow, or UI. No model files, native inference library, checksum/license notice, tests, or iOS behavior are included.
A mergeable implementation should replace this placeholder tree and:
- integrate through the existing
Transcriberboundary, or first add an explicit Whisper/SenseVoice engine abstraction; - use an actual Android-native runtime such as the sherpa-onnx Kotlin API rather than the Python
AutoModelAPI; - pin and verify the required SenseVoice model assets and expose model/engine selection through the existing settings UI;
- keep speaker diarization separate, since SenseVoiceSmall itself does not provide it;
- add an Android compile check plus focused adapter tests and one real-device or emulator transcription smoke.
Please do not merge this head as a completed solution: none of its files are currently part of the application build.
|
Thanks for taking a first pass at the SenseVoice idea from #133. I checked the patch against current
A mergeable first slice would be smaller and closer to the existing architecture: add a selectable local engine interface entry for SenseVoice, backed by a real Android native runtime such as sherpa-onnx's SenseVoice Android path, keep the current Compose/settings entry point, and add a build-level smoke test or at least Gradle compilation evidence. For a first PR, I would avoid live microphone service changes and instead transcribe an existing WAV/PCM fixture through the same flow that Whisper uses today. |
Feature: Add SenseVoice for private local transcription
Description
This pull request adds a SenseVoice feature for private local transcription, allowing users to record and transcribe audio locally on their device without sending data to the cloud.
Changes
SenseVoice.ktthat uses Android MediaRecorder and AudioRecord APIs to record audio locally.AndroidManifest.xmlto include the SenseVoice module as a service.Testing
To test this feature, follow these instructions:
Note: This feature requires a physical device for testing, as it relies on the Android MediaRecorder and AudioRecord APIs.