Irpan commited on
Commit
ed17acd
1 Parent(s): b1dd882
Files changed (5) hide show
  1. app.py +6 -5
  2. examples/.DS_Store +0 -0
  3. examples/1.wav +0 -0
  4. examples/2.wav +0 -0
  5. util.py +3 -0
app.py CHANGED
@@ -9,7 +9,7 @@ mms_transcribe = gr.Interface(
9
  gr.Audio(),
10
  gr.Dropdown(
11
  choices=[model for model in asr.models_info] + ["Compare All Models"],
12
- label="Select Model for ASR",
13
  value="ixxan/wav2vec2-large-mms-1b-uyghur-latin",
14
  interactive=True
15
  ),
@@ -18,12 +18,11 @@ mms_transcribe = gr.Interface(
18
  gr.Textbox(label="Uyghur Arabic Transcription"),
19
  gr.Textbox(label="Uyghur Latin Transcription"),
20
  ],
21
- #examples=ASR_EXAMPLES,
22
  title="Speech-to-text",
23
  description=(
24
  "Transcribe Uyghur speech audio from a microphone or input file."
25
  ),
26
- #article=ASR_NOTE,
27
  allow_flagging="never",
28
  )
29
 
@@ -33,7 +32,7 @@ mms_synthesize = gr.Interface(
33
  gr.Text(label="Input text"),
34
  gr.Dropdown(
35
  choices=[model for model in tts.models_info],
36
- label="Select Model for TTS",
37
  value="Meta-MMS",
38
  interactive=True
39
  )
@@ -43,7 +42,9 @@ mms_synthesize = gr.Interface(
43
  ],
44
  examples=util.tts_examples,
45
  title="Text-to-speech",
46
- description=("Generate audio from input text."),
 
 
47
  allow_flagging="never",
48
  )
49
 
 
9
  gr.Audio(),
10
  gr.Dropdown(
11
  choices=[model for model in asr.models_info] + ["Compare All Models"],
12
+ label="Select a Model for ASR",
13
  value="ixxan/wav2vec2-large-mms-1b-uyghur-latin",
14
  interactive=True
15
  ),
 
18
  gr.Textbox(label="Uyghur Arabic Transcription"),
19
  gr.Textbox(label="Uyghur Latin Transcription"),
20
  ],
21
+ examples=util.asr_examples,
22
  title="Speech-to-text",
23
  description=(
24
  "Transcribe Uyghur speech audio from a microphone or input file."
25
  ),
 
26
  allow_flagging="never",
27
  )
28
 
 
32
  gr.Text(label="Input text"),
33
  gr.Dropdown(
34
  choices=[model for model in tts.models_info],
35
+ label="Select a Model for TTS",
36
  value="Meta-MMS",
37
  interactive=True
38
  )
 
42
  ],
43
  examples=util.tts_examples,
44
  title="Text-to-speech",
45
+ description=(
46
+ "Generate audio from input Uyghur text."
47
+ ),
48
  allow_flagging="never",
49
  )
50
 
examples/.DS_Store ADDED
Binary file (6.15 kB). View file
 
examples/1.wav ADDED
Binary file (221 kB). View file
 
examples/2.wav ADDED
Binary file (184 kB). View file
 
util.py CHANGED
@@ -4,6 +4,9 @@ from umsc import UgMultiScriptConverter
4
  ug_arab_to_latn = UgMultiScriptConverter('UAS', 'ULS')
5
  ug_latn_to_arab = UgMultiScriptConverter('ULS', 'UAS')
6
 
 
 
 
7
  tts_examples = [
8
  ["مەكتەپكە بارغاندا تېخىمۇ بىلىملىك بولۇمەن.", "Meta-MMS"],
9
  ["قىلىچ قان تامغۇزسا، بەگ ئەل ئالىدۇ؛ قەلەمدىن سىياھتانسا، ئالتۇن كېلىدۇ.", "Meta-MMS"],
 
4
  ug_arab_to_latn = UgMultiScriptConverter('UAS', 'ULS')
5
  ug_latn_to_arab = UgMultiScriptConverter('ULS', 'UAS')
6
 
7
+ asr_examples = [['examples/1.wav', 'ixxan/wav2vec2-large-mms-1b-uyghur-latin'],
8
+ ['examples/2.wav', 'ixxan/wav2vec2-large-mms-1b-uyghur-latin']]
9
+
10
  tts_examples = [
11
  ["مەكتەپكە بارغاندا تېخىمۇ بىلىملىك بولۇمەن.", "Meta-MMS"],
12
  ["قىلىچ قان تامغۇزسا، بەگ ئەل ئالىدۇ؛ قەلەمدىن سىياھتانسا، ئالتۇن كېلىدۇ.", "Meta-MMS"],