Merge dedicated offline French Whisper model

This commit is contained in:
Blendman974 committed 2026-11-10 23:22:24 +01:00
commit 54ba6b4f10
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() } }
@@ -160,9 +161,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)
}
/**