File size: 926 Bytes
ced8913
 
8b62e72
 
e7915c4
 
25a489b
2b0f8d3
8b62e72
 
 
 
 
2b0f8d3
88f69e7
ced8913
 
 
 
 
 
 
 
 
8b62e72
ced8913
 
 
 
 
 
8b62e72
ced8913
 
00cf2c9
ced8913
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import gradio as gr

this_Markdown1=(
                    """**
                    <h3>text to Speech</h3>
                     <h5>text to Speech</h5>
                    Give me something to say!
                    """)
this_Markdown2=(
                    """**
                    say something and i will write it!
                    """)



tts_examples = [
    "I love learning machine learning",
    "How do you do?",
]

tts_demo = gr.load(
    "huggingface/facebook/fastspeech2-en-ljspeech",
    title=None,
    examples=tts_examples,
    description=this_Markdown1,
)

stt_demo = gr.load(
    "huggingface/facebook/wav2vec2-base-960h",
    title=None,
    inputs="mic",
    description=this_Markdown2,
)
gr.api_name="additionss"
demo = gr.TabbedInterface([tts_demo, stt_demo], ["Text-to-speech", "Speech-to-text"])##,css=".gradio-container {background-color: black}")
if __name__ == "__main__":
    demo.launch()