import gradio as gr
this_Markdown1=(
"""**
text to Speech
text to Speech
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()