jaumaras commited on
Commit
ced8913
·
1 Parent(s): 8d0984e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ gr.api_name="additionss"
22
+ demo = gr.TabbedInterface([tts_demo, stt_demo], ["Text-to-speech", "Speech-to-text"],css=".gradio-container {background-color: black}")
23
+ # ".secondary_hue {background-color: black}")
24
+
25
+
26
+ if __name__ == "__main__":
27
+ demo.launch()