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

+5 -4
View File
@@ -884,13 +884,14 @@ export const ringConnectionModeSetting = new ConfigSettingEnum<RingConnectionMod
// keeps its name (it's a persisted setting on real installs) but its label
// below now says "OpenAI" to tell the two apart in the picker.
// "whisper-server" is a self-hosted OpenAI-compatible Whisper (e.g. vLLM).
export type VoiceProvider = "onboard" | "onboard-whisper" | "elevenlabs" | "whisper" | "soniox" | "whisper-server";
export type VoiceProvider = "onboard" | "onboard-whisper" | "onboard-whisper-fr" | "elevenlabs" | "whisper" | "soniox" | "whisper-server";
// On iOS "onboard" is Apple's on-device recognizer, and there is no
// "onboard-whisper" (the sherpa-onnx models are Android-only).
const voiceProviderLabels: Record<VoiceProvider, string> = {
onboard: global.isIOS ? "On-device (Apple)" : "On-device (Moonshine)",
"onboard-whisper": "On-device (Whisper)",
"onboard-whisper-fr": "On-device (Whisper French)",
elevenlabs: "ElevenLabs",
whisper: "OpenAI (Whisper)",
soniox: "Soniox",
@@ -904,7 +905,7 @@ export const voiceProviderSetting = new ConfigSettingEnum<VoiceProvider>({
defaultValue: "onboard",
values: global.isIOS
? ["onboard", "elevenlabs", "whisper", "soniox", "whisper-server"]
: ["onboard", "onboard-whisper", "elevenlabs", "whisper", "soniox", "whisper-server"],
: ["onboard", "onboard-whisper", "onboard-whisper-fr", "elevenlabs", "whisper", "soniox", "whisper-server"],
formatValue: (value) => voiceProviderLabels[value] ?? value,
isDisabled: (value) => {
if (value === "elevenlabs") return elevenLabsApiKeySetting.get().trim().length === 0;
@@ -915,7 +916,7 @@ export const voiceProviderSetting = new ConfigSettingEnum<VoiceProvider>({
},
description: global.isIOS
? "Speech-to-text engine for voice input. ElevenLabs, OpenAI, and Soniox are cloud services that need an API key (Settings > API Keys), with significantly better accuracy than on-device transcription. Whisper server is your own OpenAI-compatible Whisper (set its URL below). On-device uses your iPhone's speech language and never leaves the phone."
: "Speech-to-text engine for voice input. ElevenLabs, OpenAI, and Soniox are cloud services that need an API key, with significantly better accuracy than on-device transcription. Whisper server is your own OpenAI-compatible Whisper (set its URL below). The two On-device options need their voice model downloaded (below) and never leave the phone.",
: "Speech-to-text engine for voice input. ElevenLabs, OpenAI, and Soniox are cloud services that need an API key, with significantly better accuracy than on-device transcription. Whisper server is your own OpenAI-compatible Whisper (set its URL below). The On-device options need their voice model downloaded (below) and never leave the phone. Whisper French uses the French-only small model and always transcribes in French.",
});
const wakeWordActionLabels: Record<WakeWordAction, string> = {
@@ -1157,7 +1158,7 @@ export const voiceLanguageSetting = new ConfigSettingEnum<TranscriptionLanguage>
: value === "auto" ? "Auto-detect" : TRANSCRIPTION_LANGUAGES[value],
description: "Spoken language for OpenAI, on-device Whisper and other cloud transcription providers. " +
"Provider default preserves English for on-device Whisper and auto-detection for cloud providers, with the server's own language below. " +
"On-device Whisper needs the multilingual model for auto-detection or languages other than English. Moonshine remains English-only.",
"On-device Whisper needs the multilingual model for auto-detection or languages other than English. The dedicated Whisper French provider always uses French, without changing this preference. Moonshine remains English-only.",
});
export function getVoiceTranscriptionLanguage(provider: VoiceProvider): string {
+1
View File
@@ -150,6 +150,7 @@ function settingsSections(): SettingsSection[] {
asrModelMenuItem("moonshine"),
asrModelMenuItem("whisper-base-en"),
asrModelMenuItem("whisper-base"),
asrModelMenuItem("whisper-small-fr"),
],
},
{