Spaces:
Sleeping
Sleeping
Upload with huggingface_hub
Browse files
README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.4.1
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
|
2 |
---
|
3 |
+
title: stt_or_tts
|
4 |
+
emoji: 🔥
|
5 |
+
colorFrom: indigo
|
6 |
+
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
sdk_version: 3.4.1
|
9 |
+
|
10 |
app_file: app.py
|
11 |
pinned: false
|
12 |
---
|
|
|
|
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
title = "GPT-J-6B"
|
4 |
+
|
5 |
+
tts_examples = [
|
6 |
+
"I love learning machine learning",
|
7 |
+
"How do you do?",
|
8 |
+
]
|
9 |
+
|
10 |
+
tts_demo = gr.Interface.load(
|
11 |
+
"huggingface/facebook/fastspeech2-en-ljspeech",
|
12 |
+
title=None,
|
13 |
+
examples=tts_examples,
|
14 |
+
description="Give me something to say!",
|
15 |
+
)
|
16 |
+
|
17 |
+
stt_demo = gr.Interface.load(
|
18 |
+
"huggingface/facebook/wav2vec2-base-960h",
|
19 |
+
title=None,
|
20 |
+
inputs="mic",
|
21 |
+
description="Let me try to guess what you're saying!",
|
22 |
+
)
|
23 |
+
|
24 |
+
demo = gr.TabbedInterface([tts_demo, stt_demo], ["Text-to-speech", "Speech-to-text"])
|
25 |
+
|
26 |
+
if __name__ == "__main__":
|
27 |
+
demo.launch()
|