Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat: split Chinese into Simplified and Traditional language options (#267)
Yen-Ying Lee29441c60005d
diff --git a/src/config/languageRegistry.json b/src/config/languageRegistry.jsonindex 5c8383a63..0f539bbe7 100644--- a/src/config/languageRegistry.json+++ b/src/config/languageRegistry.json@@ -78,13 +78,22 @@"instruction": "LANGUAGE CONTEXT: The user's preferred language is Catalan. The transcribed text will be in Catalan. You MUST respond entirely in Catalan while maintaining proper Catalan grammar, spelling, and punctuation. If the user naturally uses English words or technical terms, preserve those as-is."},{- "code": "zh",- "label": "Chinese",+ "code": "zh-CN",+ "label": "Chinese (Simplified)","flag": "\uD83C\uDDE8\uD83C\uDDF3","whisper": true,"parakeet": false,"assemblyai": false,- "instruction": "LANGUAGE CONTEXT: The user's preferred language is Chinese. The transcribed text will be in Chinese. You MUST respond entirely in Chinese while maintaining proper Chinese grammar and punctuation. Preserve any English technical terms as the user spoke them."+ "instruction": "LANGUAGE CONTEXT: The user's preferred language is Simplified Chinese (简体中文). The transcribed text will be in Chinese. You MUST respond entirely in Simplified Chinese while maintaining proper grammar and punctuation. Use simplified characters throughout (e.g., 简体, 语言, 学习). Preserve any English technical terms as the user spoke them."+ },+ {+ "code": "zh-TW",+ "label": "Chinese (Traditional)",+ "flag": "\uD83C\uDDF9\uD83C\uDDFC",+ "whisper": true,+ "parakeet": false,+ "assemblyai": false,+ "instruction": "LANGUAGE CONTEXT: The user's preferred language is Traditional Chinese (繁體中文). The transcribed text will be in Chinese. You MUST respond entirely in Traditional Chinese while maintaining proper grammar and punctuation. Use traditional characters throughout (e.g., 繁體, 語言, 學習). Preserve any English technical terms as the user spoke them."},{"code": "hr",diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.tsindex 9794fc754..d3a8ea41c 100644--- a/src/hooks/useSettings.ts+++ b/src/hooks/useSettings.ts@@ -71,7 +71,20 @@ export interface ThemeSettings {theme: "light" | "dark" | "auto";}+const LANGUAGE_MIGRATIONS: Record<string, string> = { zh: "zh-CN" };+let _migrated = false;+function migratePreferredLanguage() {+ if (_migrated) return;+ _migrated = true;+ const stored = localStorage.getItem("preferredLanguage");+ if (stored && LANGUAGE_MIGRATIONS[stored]) {+ localStorage.setItem("preferredLanguage", LANGUAGE_MIGRATIONS[stored]);+ }+}+function useSettingsInternal() {+ migratePreferredLanguage();+const [useLocalWhisper, setUseLocalWhisper] = useLocalStorage("useLocalWhisper", false, {serialize: String,deserialize: (value) => value === "true",