Commit 3: Add 35 file(s)
Browse files- demos/stt_or_tts/run.ipynb +1 -1
- demos/stt_or_tts/run.py +2 -0
- requirements.txt +2 -2
demos/stt_or_tts/run.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: stt_or_tts"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "tts_examples = [\n", " \"I love learning machine learning\",\n", " \"How do you do?\",\n", "]\n", "\n", "tts_demo = gr.load(\n", " \"huggingface/facebook/fastspeech2-en-ljspeech\",\n", " title=None,\n", " examples=tts_examples,\n", " description=\"Give me something to say!\",\n", ")\n", "\n", "stt_demo = gr.load(\n", " \"huggingface/facebook/wav2vec2-base-960h\",\n", " title=None,\n", " inputs=gr.Microphone(type=\"filepath\"),\n", " description=\"Let me try to guess what you're saying!\",\n", ")\n", "\n", "demo = gr.TabbedInterface([tts_demo, stt_demo], [\"Text-to-speech\", \"Speech-to-text\"])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
|
|
1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: stt_or_tts"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "tts_examples = [\n", " \"I love learning machine learning\",\n", " \"How do you do?\",\n", "]\n", "\n", "tts_demo = gr.load(\n", " \"huggingface/facebook/fastspeech2-en-ljspeech\",\n", " title=None,\n", " examples=tts_examples,\n", " description=\"Give me something to say!\",\n", " cache_examples=False\n", ")\n", "\n", "stt_demo = gr.load(\n", " \"huggingface/facebook/wav2vec2-base-960h\",\n", " title=None,\n", " inputs=gr.Microphone(type=\"filepath\"),\n", " description=\"Let me try to guess what you're saying!\",\n", " cache_examples=False\n", ")\n", "\n", "demo = gr.TabbedInterface([tts_demo, stt_demo], [\"Text-to-speech\", \"Speech-to-text\"])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
demos/stt_or_tts/run.py
CHANGED
@@ -10,6 +10,7 @@ tts_demo = gr.load(
|
|
10 |
title=None,
|
11 |
examples=tts_examples,
|
12 |
description="Give me something to say!",
|
|
|
13 |
)
|
14 |
|
15 |
stt_demo = gr.load(
|
@@ -17,6 +18,7 @@ stt_demo = gr.load(
|
|
17 |
title=None,
|
18 |
inputs=gr.Microphone(type="filepath"),
|
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"])
|
|
|
10 |
title=None,
|
11 |
examples=tts_examples,
|
12 |
description="Give me something to say!",
|
13 |
+
cache_examples=False
|
14 |
)
|
15 |
|
16 |
stt_demo = gr.load(
|
|
|
18 |
title=None,
|
19 |
inputs=gr.Microphone(type="filepath"),
|
20 |
description="Let me try to guess what you're saying!",
|
21 |
+
cache_examples=False
|
22 |
)
|
23 |
|
24 |
demo = gr.TabbedInterface([tts_demo, stt_demo], ["Text-to-speech", "Speech-to-text"])
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
gradio-client @ git+https://github.com/gradio-app/gradio@
|
2 |
-
https://gradio-pypi-previews.s3.amazonaws.com/
|
3 |
pypistats==1.1.0
|
4 |
plotly
|
5 |
matplotlib
|
|
|
1 |
+
gradio-client @ git+https://github.com/gradio-app/gradio@92fa6c1f3d0424faabebe4f5e15c017b72818dca#subdirectory=client/python
|
2 |
+
https://gradio-pypi-previews.s3.amazonaws.com/92fa6c1f3d0424faabebe4f5e15c017b72818dca/gradio-5.18.0-py3-none-any.whl
|
3 |
pypistats==1.1.0
|
4 |
plotly
|
5 |
matplotlib
|