aupfe08 commited on
Commit
f50255b
·
1 Parent(s): 3e75a01

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ tts_examples = [
4
+ "I love learning machine learning",
5
+ "How do you do?",
6
+ ]
7
+
8
+ tts_demo = gr.load(
9
+ "huggingface/facebook/fastspeech2-en-ljspeech",
10
+ title=None,
11
+ examples=tts_examples,
12
+ description="Give me something to say!",
13
+ )
14
+
15
+ stt_demo = gr.load(
16
+ "huggingface/facebook/wav2vec2-base-960h",
17
+ title=None,
18
+ inputs="mic",
19
+ description="Let me try to guess what you're saying!",
20
+ )
21
+
22
+ demo = gr.TabbedInterface([tts_demo, stt_demo], ["Text-to-speech", "Speech-to-text"])
23
+
24
+ if __name__ == "__main__":
25
+ demo.launch()