from umsc import UgMultiScriptConverter # Initialize uyghur script converter ug_arab_to_latn = UgMultiScriptConverter('UAS', 'ULS') ug_latn_to_arab = UgMultiScriptConverter('ULS', 'UAS') asr_examples = [ ['examples/1.wav', 'OpenAI-Whisper'], ['examples/1.wav', 'Meta-MMS'], ['examples/1.wav', 'Ixxan-FineTuned-Whisper'], ['examples/1.wav', 'Ixxan-FineTuned-MMS'], ['examples/2.wav', 'OpenAI-Whisper'], ['examples/2.wav', 'Meta-MMS'], ['examples/2.wav', 'Ixxan-FineTuned-Whisper'], ['examples/2.wav', 'Ixxan-FineTuned-MMS'] ] tts_examples = [ ["قىلىچ قان تامغۇزسا، بەگ ئەل ئالىدۇ؛ قەلەمدىن سىياھتانسا، ئالتۇن كېلىدۇ.", "IS2AI-TurkicTTS"], ["قىلىچ قان تامغۇزسا، بەگ ئەل ئالىدۇ؛ قەلەمدىن سىياھتانسا، ئالتۇن كېلىدۇ.", "Meta-MMS"], ["قىلىچ قان تامغۇزسا، بەگ ئەل ئالىدۇ؛ قەلەمدىن سىياھتانسا، ئالتۇن كېلىدۇ.", "Ixxan-FineTuned-MMS"], ["Bu putbol musabiqisining axirlishishi bilen, bu musabiqe pesli axirlashti.", "IS2AI-TurkicTTS"], ["Bu putbol musabiqisining axirlishishi bilen, bu musabiqe pesli axirlashti.", "Meta-MMS"], ["Bu putbol musabiqisining axirlishishi bilen, bu musabiqe pesli axirlashti.", "Ixxan-FineTuned-MMS"], ["Yaxshimusiz?", "IS2AI-TurkicTTS"], ["Yaxshimusiz?", "Meta-MMS"], ["Yaxshimusiz?", "Ixxan-FineTuned-MMS"] ] asr_notes = """ The models used in this demo are: - OpenAI-Whisper: OpenAI's Whisper-small model for Uzbek language. (As Uyghur is not supported by OpenAI Whisper) More info: https://huggingface.co/openai/whisper-small - Meta-MMS: Meta's MMS ASR model for Uyghur Ararbic script. More info: https://huggingface.co/facebook/mms-1b-all - Ixxan-FineTuned-Whisper: Whisper-small fine-tuned with Uyghur datasets. More info: https://huggingface.co/ixxan/whisper-small-uyghur-common-voice - Ixxan-FineTuned-MMS: MMS fine-tuned with Uyghur datasets. More info: https://huggingface.co/ixxan/wav2vec2-large-mms-1b-uyghur-latin """ tts_notes = """ The models used in this demo are: - IS2AI-TurkicTTS: IS2AI's Turkic TTS model for Uyghur language. More info: https://github.com/IS2AI/TurkicTTS - Meta-MMS: Meta's TTS model for Uyghur Ararbic script. More info: https://huggingface.co/facebook/mms-tts-uig-script_arabic - Ixxan-FineTuned-MMS: MMS fine-tuned with Uyghur datasets. More info: https://huggingface.co/ixxan/mms-tts-uig-script_arabic-UQSpeech """