Skier8402 commited on
Commit
6696385
·
1 Parent(s): 002bf91

Update app.py

Browse files

Add the model.

I have not tried other models though.

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
- model = pipeline("automatic-speech-recognition")
5
 
6
 
7
  def transcribe_audio(mic=None, file=None):
@@ -21,7 +21,7 @@ gr.Interface(
21
  gr.Audio(source="microphone", type="filepath", optional=True),
22
  gr.Audio(source="upload", type="filepath", optional=True),
23
  ],
24
- title = "Automatic Speech Translation model",
25
  description = "This application can convert speech to text using the best models in huggingface. Get your speech transcribed by using your microphone or uploading audio where someone is talking.",
26
  outputs="text",
27
  ).launch()
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
+ model = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h")
5
 
6
 
7
  def transcribe_audio(mic=None, file=None):
 
21
  gr.Audio(source="microphone", type="filepath", optional=True),
22
  gr.Audio(source="upload", type="filepath", optional=True),
23
  ],
24
+ title = "Automatic Speech Recognition",
25
  description = "This application can convert speech to text using the best models in huggingface. Get your speech transcribed by using your microphone or uploading audio where someone is talking.",
26
  outputs="text",
27
  ).launch()