Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
4 |
-
#from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
|
5 |
-
|
6 |
-
|
7 |
-
#MODEL_ID = "jonatasgrosman/wav2vec2-large-xlsr-53-german"
|
8 |
|
9 |
pipeline = pipeline(task="automatic-speech-recognition", model="jonatasgrosman/wav2vec2-large-xlsr-53-german")
|
10 |
#pipeline = pipeline(task="automatic-speech-recognition", model="openai/whisper-large")
|
@@ -17,7 +13,7 @@ def transcribe(audio_path : str) -> str:
|
|
17 |
demo = gr.Interface(
|
18 |
fn=transcribe,
|
19 |
#inputs="microphone",
|
20 |
-
inputs=gr.inputs.Audio(label="Upload audio file", type="filepath"),
|
21 |
outputs="text"
|
22 |
)
|
23 |
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
4 |
|
5 |
pipeline = pipeline(task="automatic-speech-recognition", model="jonatasgrosman/wav2vec2-large-xlsr-53-german")
|
6 |
#pipeline = pipeline(task="automatic-speech-recognition", model="openai/whisper-large")
|
|
|
13 |
demo = gr.Interface(
|
14 |
fn=transcribe,
|
15 |
#inputs="microphone",
|
16 |
+
inputs=gr.inputs.Audio(label="Upload audio file", type="filepath"), "microphone",
|
17 |
outputs="text"
|
18 |
)
|
19 |
|