unijoh commited on
Commit
2b96c49
1 Parent(s): a7f185d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -9
app.py CHANGED
@@ -8,19 +8,25 @@ def main():
8
  gr.Markdown("# Faroese ASR, TTS, and LID Demo")
9
 
10
  with gr.Tab("ASR"):
11
- gr.Audio(type="filepath", label=None)
12
- gr.Button("Transcribe")
13
- gr.Textbox()
 
 
14
 
15
  with gr.Tab("TTS"):
16
- gr.Textbox(label="Text Input")
17
- gr.Button("Synthesize")
18
- gr.Audio()
 
 
19
 
20
  with gr.Tab("LID"):
21
- gr.Audio(type="filepath", label=None)
22
- gr.Button("Identify Language")
23
- gr.Textbox()
 
 
24
 
25
  demo.launch()
26
 
 
8
  gr.Markdown("# Faroese ASR, TTS, and LID Demo")
9
 
10
  with gr.Tab("ASR"):
11
+ audio_input = gr.Audio(source="microphone", type="filepath")
12
+ transcribe_button = gr.Button("Transcribe")
13
+ transcribe_output = gr.Textbox()
14
+
15
+ transcribe_button.click(fn=transcribe, inputs=audio_input, outputs=transcribe_output)
16
 
17
  with gr.Tab("TTS"):
18
+ text_input = gr.Textbox(label="Text Input")
19
+ synthesize_button = gr.Button("Synthesize")
20
+ synthesize_output = gr.Audio()
21
+
22
+ synthesize_button.click(fn=synthesize_speech, inputs=text_input, outputs=synthesize_output)
23
 
24
  with gr.Tab("LID"):
25
+ audio_input_lid = gr.Audio(source="microphone", type="filepath")
26
+ identify_button = gr.Button("Identify Language")
27
+ identify_output = gr.Textbox()
28
+
29
+ identify_button.click(fn=identify, inputs=audio_input_lid, outputs=identify_output)
30
 
31
  demo.launch()
32