Spaces:
Runtime error
Runtime error
Upload with huggingface_hub
Browse files- DESCRIPTION.md +1 -0
- README.md +1 -1
- app.py +2 -4
DESCRIPTION.md
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
Automatic speech recognition English. Record from your microphone and the app will transcribe the audio.
|
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
---
|
3 |
title: automatic-speech-recognition
|
4 |
-
emoji:
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
1 |
|
2 |
---
|
3 |
title: automatic-speech-recognition
|
4 |
+
emoji: 🔥
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
app.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
-
# URL: https://huggingface.co/spaces/gradio/automatic-speech-recognition
|
2 |
-
# DESCRIPTION: Automatic speech recognition in Chinese and English. Uses a tabbed layout to give the user the choice between uploading audio or recording from a microphone.
|
3 |
-
# imports
|
4 |
import gradio as gr
|
5 |
import os
|
6 |
|
|
|
7 |
auth_token = os.getenv("auth_token")
|
8 |
|
9 |
# automatically load the interface from a HF model
|
|
|
10 |
demo = gr.Interface.load(
|
11 |
"huggingface/facebook/wav2vec2-base-960h",
|
12 |
title="Speech-to-text",
|
@@ -15,5 +14,4 @@ demo = gr.Interface.load(
|
|
15 |
api_key=auth_token
|
16 |
)
|
17 |
|
18 |
-
# launch
|
19 |
demo.launch()
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
|
4 |
+
# save your HF API token from https:/hf.co/settings/tokens as an env variable to avoid rate limiting
|
5 |
auth_token = os.getenv("auth_token")
|
6 |
|
7 |
# automatically load the interface from a HF model
|
8 |
+
# you can remove the api_key parameter if you don't care about rate limiting.
|
9 |
demo = gr.Interface.load(
|
10 |
"huggingface/facebook/wav2vec2-base-960h",
|
11 |
title="Speech-to-text",
|
14 |
api_key=auth_token
|
15 |
)
|
16 |
|
|
|
17 |
demo.launch()
|