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
export type LanguageCode = string;
export type Language = {
code: LanguageCode;
label: string;
flag: string;
};
export const DEFAULT_LANGUAGE: LanguageCode = 'auto';
export const LANGUAGES: Language[] = [
{ code: 'auto', label: 'Auto-detect', flag: '๐' },
{ code: 'af', label: 'Afrikaans', flag: '๐ฟ๐ฆ' },
{ code: 'ar', label: 'Arabic', flag: '๐ธ๐ฆ' },
{ code: 'hy', label: 'Armenian', flag: '๐ฆ๐ฒ' },
{ code: 'az', label: 'Azerbaijani', flag: '๐ฆ๐ฟ' },
{ code: 'be', label: 'Belarusian', flag: '๐ง๐พ' },
{ code: 'bs', label: 'Bosnian', flag: '๐ง๐ฆ' },
{ code: 'bg', label: 'Bulgarian', flag: '๐ง๐ฌ' },
{ code: 'ca', label: 'Catalan', flag: '๐ช๐ธ' },
{ code: 'zh-CN', label: 'Chinese (Simplified)', flag: '๐จ๐ณ' },
{ code: 'zh-TW', label: 'Chinese (Traditional)', flag: '๐น๐ผ' },
{ code: 'hr', label: 'Croatian', flag: '๐ญ๐ท' },
{ code: 'cs', label: 'Czech', flag: '๐จ๐ฟ' },
{ code: 'da', label: 'Danish', flag: '๐ฉ๐ฐ' },
{ code: 'nl', label: 'Dutch', flag: '๐ณ๐ฑ' },
{ code: 'en-US', label: 'English (US)', flag: '๐บ๐ธ' },
{ code: 'en-GB', label: 'English (UK)', flag: '๐ฌ๐ง' },
{ code: 'et', label: 'Estonian', flag: '๐ช๐ช' },
{ code: 'fi', label: 'Finnish', flag: '๐ซ๐ฎ' },
{ code: 'fr', label: 'French', flag: '๐ซ๐ท' },
{ code: 'gl', label: 'Galician', flag: '๐ช๐ธ' },
{ code: 'de', label: 'German', flag: '๐ฉ๐ช' },
{ code: 'el', label: 'Greek', flag: '๐ฌ๐ท' },
{ code: 'he', label: 'Hebrew', flag: '๐ฎ๐ฑ' },
{ code: 'hi', label: 'Hindi', flag: '๐ฎ๐ณ' },
{ code: 'hu', label: 'Hungarian', flag: '๐ญ๐บ' },
{ code: 'is', label: 'Icelandic', flag: '๐ฎ๐ธ' },
{ code: 'id', label: 'Indonesian', flag: '๐ฎ๐ฉ' },
{ code: 'it', label: 'Italian', flag: '๐ฎ๐น' },
{ code: 'ja', label: 'Japanese', flag: '๐ฏ๐ต' },
{ code: 'kn', label: 'Kannada', flag: '๐ฎ๐ณ' },
{ code: 'kk', label: 'Kazakh', flag: '๐ฐ๐ฟ' },
{ code: 'ko', label: 'Korean', flag: '๐ฐ๐ท' },
{ code: 'lv', label: 'Latvian', flag: '๐ฑ๐ป' },
{ code: 'lt', label: 'Lithuanian', flag: '๐ฑ๐น' },
{ code: 'mk', label: 'Macedonian', flag: '๐ฒ๐ฐ' },
{ code: 'ms', label: 'Malay', flag: '๐ฒ๐พ' },
{ code: 'mt', label: 'Maltese', flag: '๐ฒ๐น' },
{ code: 'mr', label: 'Marathi', flag: '๐ฎ๐ณ' },
{ code: 'mi', label: 'Maori', flag: '๐ณ๐ฟ' },
{ code: 'ne', label: 'Nepali', flag: '๐ณ๐ต' },
{ code: 'no', label: 'Norwegian', flag: '๐ณ๐ด' },
{ code: 'fa', label: 'Persian', flag: '๐ฎ๐ท' },
{ code: 'pl', label: 'Polish', flag: '๐ต๐ฑ' },
{ code: 'pt', label: 'Portuguese', flag: '๐ต๐น' },
{ code: 'ro', label: 'Romanian', flag: '๐ท๐ด' },
{ code: 'ru', label: 'Russian', flag: '๐ท๐บ' },
{ code: 'sr', label: 'Serbian', flag: '๐ท๐ธ' },
{ code: 'sk', label: 'Slovak', flag: '๐ธ๐ฐ' },
{ code: 'sl', label: 'Slovenian', flag: '๐ธ๐ฎ' },
{ code: 'es', label: 'Spanish', flag: '๐ช๐ธ' },
{ code: 'sw', label: 'Swahili', flag: '๐ฐ๐ช' },
{ code: 'sv', label: 'Swedish', flag: '๐ธ๐ช' },
{ code: 'tl', label: 'Tagalog', flag: '๐ต๐ญ' },
{ code: 'ta', label: 'Tamil', flag: '๐ฎ๐ณ' },
{ code: 'th', label: 'Thai', flag: '๐น๐ญ' },
{ code: 'tr', label: 'Turkish', flag: '๐น๐ท' },
{ code: 'uk', label: 'Ukrainian', flag: '๐บ๐ฆ' },
{ code: 'ur', label: 'Urdu', flag: '๐ต๐ฐ' },
{ code: 'vi', label: 'Vietnamese', flag: '๐ป๐ณ' },
{ code: 'cy', label: 'Welsh', flag: '๐ด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ' },
];
const BY_CODE = new Map(LANGUAGES.map((l) => [l.code, l]));
export function getLanguage(code: LanguageCode | undefined): Language {
if (!code) return LANGUAGES[0];
return BY_CODE.get(code) ?? LANGUAGES[0];
}
// Whisper / OpenAI want the base ISO-639 code (no region). 'auto' becomes
// undefined so the upstream API auto-detects.
export function toApiLanguage(code: LanguageCode | undefined): string | undefined {
if (!code || code === 'auto') return undefined;
return code.split('-')[0];
}