feat(voice): add dedicated offline French Whisper model

This commit is contained in:
Blendman974 committed 2026-11-10 23:20:31 +01:00
1 parent a80d6697b5
commit b4b073412f
18 files changed
+621 -17

No files matched your search

@@ -74,6 +74,7 @@ class FaceclawVoiceController(context: Context) {
@Volatile
private var communicator: FaceclawBleCommunicator? = null
private var whisperModel = WhisperModelFiles.forLanguage(null)
private var frenchWhisper = false
private val host = object : VoiceCaptureHost {
override val dispatcher = CallbackDispatcher { action -> mainHandler.post { action() } }
@@ -158,9 +159,15 @@ class FaceclawVoiceController(context: Context) {
session.setOnboardModelKind(kind)
}
/** Select the dedicated French fine-tune before setting the capture language. */
fun setFrenchWhisper(enabled: Boolean) {
frenchWhisper = enabled
whisperModel = WhisperModelFiles.forSelection(whisperModel.language, enabled)
}
/** Language for the next on-device Whisper capture; empty enables auto-detection. */
fun setOnboardLanguage(language: String?) {
whisperModel = WhisperModelFiles.forLanguage(language)
whisperModel = WhisperModelFiles.forSelection(language, frenchWhisper)
}
/**