File size: 594 Bytes
4c72fe1
d8e43a5
 
4c72fe1
 
37f640c
 
4c72fe1
155aa04
4c72fe1
 
 
 
37f640c
4c72fe1
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# URL: https://huggingface.co/spaces/gradio/automatic-speech-recognition
# 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.
# imports
import gradio as gr

auth_token = os.getenv("auth_token")

# automatically load the interface from a HF model 
demo = gr.Interface.load(
    "huggingface/facebook/wav2vec2-base-960h",
    title="Speech-to-text",
    inputs="mic",
    description="Let me try to guess what you're saying!",
    api_key=auth_token
)

# launch
demo.launch()