Spaces:
Runtime error
Runtime error
LANGUAGES = [ | |
"English", | |
"Chinese", | |
"German", | |
"Spanish", | |
"Russian", | |
"Korean", | |
"French", | |
"Japanese", | |
"Portuguese", | |
"Turkish", | |
"Polish", | |
"Catalan", | |
"Dutch", | |
"Arabic", | |
"Swedish", | |
"Italian", | |
"Indonesian", | |
"Hindi", | |
"Finnish", | |
"Vietnamese", | |
"Hebrew", | |
"Ukrainian", | |
"Greek", | |
"Malay", | |
"Czech", | |
"Romanian", | |
"Danish", | |
"Hungarian", | |
"Tamil", | |
"Norwegian", | |
"Thai", | |
"Urdu", | |
"Croatian", | |
"Bulgarian", | |
"Lithuanian", | |
"Latin", | |
"Maori", | |
"Malayalam", | |
"Welsh", | |
"Slovak", | |
"Telugu", | |
"Persian", | |
"Latvian", | |
"Bengali", | |
"Serbian", | |
"Azerbaijani", | |
"Slovenian", | |
"Kannada", | |
"Estonian", | |
"Macedonian", | |
"Breton", | |
"Basque", | |
"Icelandic", | |
"Armenian", | |
"Nepali", | |
"Mongolian", | |
"Bosnian", | |
"Kazakh", | |
"Albanian", | |
"Swahili", | |
"Galician", | |
"Marathi", | |
"Punjabi", | |
"Sinhala", | |
"Khmer", | |
"Shona", | |
"Yoruba", | |
"Somali", | |
"Afrikaans", | |
"Occitan", | |
"Georgian", | |
"Belarusian", | |
"Tajik", | |
"Sindhi", | |
"Gujarati", | |
"Amharic", | |
"Yiddish", | |
"Lao", | |
"Uzbek", | |
"Faroese", | |
"Haitian Creole", | |
"Pashto", | |
"Turkmen", | |
"Nynorsk", | |
"Maltese", | |
"Sanskrit", | |
"Luxembourgish", | |
"Myanmar", | |
"Tibetan", | |
"Tagalog", | |
"Malagasy", | |
"Assamese", | |
"Tatar", | |
"Hawaiian", | |
"Lingala", | |
"Hausa", | |
"Bashkir", | |
"Javanese", | |
"Sundanese", | |
] | |
WHISPER_MODELS = [ | |
"", | |
"tiny", | |
"base", | |
"small", | |
"medium", | |
"large", | |
] | |
language_dict = { | |
"": "", | |
"en": "English", | |
"zh": "Chinese", | |
"de": "German", | |
"es": "Spanish", | |
"ru": "Russian", | |
"ko": "Korean", | |
"fr": "French", | |
"ja": "Japanese", | |
"pt": "Portuguese", | |
"tr": "Turkish", | |
"pl": "Polish", | |
"ca": "Catalan", | |
"nl": "Dutch", | |
"ar": "Arabic", | |
"sv": "Swedish", | |
"it": "Italian", | |
"id": "Indonesian", | |
"hi": "Hindi", | |
"fi": "Finnish", | |
"vi": "Vietnamese", | |
"he": "Hebrew", | |
"uk": "Ukrainian", | |
"el": "Greek", | |
"ms": "Malay", | |
"cs": "Czech", | |
"ro": "Romanian", | |
"da": "Danish", | |
"hu": "Hungarian", | |
"ta": "Tamil", | |
"no": "Norwegian", | |
"th": "Thai", | |
"ur": "Urdu", | |
"hr": "Croatian", | |
"bg": "Bulgarian", | |
"lt": "Lithuanian", | |
"la": "Latin", | |
"mi": "Maori", | |
"ml": "Malayalam", | |
"cy": "Welsh", | |
"sk": "Slovak", | |
"te": "Telugu", | |
"fa": "Persian", | |
"lv": "Latvian", | |
"bn": "Bengali", | |
"sr": "Serbian", | |
"az": "Azerbaijani", | |
"sl": "Slovenian", | |
"kn": "Kannada", | |
"et": "Estonian", | |
"mk": "Macedonian", | |
"br": "Breton", | |
"eu": "Basque", | |
"is": "Icelandic", | |
"hy": "Armenian", | |
"ne": "Nepali", | |
"mn": "Mongolian", | |
"bs": "Bosnian", | |
"kk": "Kazakh", | |
"sq": "Albanian", | |
"sw": "Swahili", | |
"gl": "Galician", | |
"mr": "Marathi", | |
"pa": "Punjabi", | |
"si": "Sinhala", | |
"km": "Khmer", | |
"sn": "Shona", | |
"yo": "Yoruba", | |
} | |
all_languages = list(language_dict.keys()) + list(language_dict.values()) | |