Update app.py
Browse filesAdd the model.
I have not tried other models though.
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
|
| 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()
|