Spaces:
Runtime error
Runtime error
jiaofengxu
commited on
Commit
Β·
43ca92d
1
Parent(s):
2c67b9f
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
|
|
3 |
|
4 |
#model = pipeline("automatic-speech-recognition")
|
5 |
model = pipeline("automatic-speech-recognition", model="openai/whisper-base.en")
|
|
|
6 |
|
7 |
def transcribe_audio(mic=None, file=None):
|
8 |
if mic is not None:
|
@@ -18,8 +19,8 @@ def transcribe_audio(mic=None, file=None):
|
|
18 |
gr.Interface(
|
19 |
fn=transcribe_audio,
|
20 |
inputs=[
|
21 |
-
gr.Audio(
|
22 |
-
gr.Audio(
|
23 |
],
|
24 |
outputs="text",
|
25 |
).launch()
|
|
|
3 |
|
4 |
#model = pipeline("automatic-speech-recognition")
|
5 |
model = pipeline("automatic-speech-recognition", model="openai/whisper-base.en")
|
6 |
+
#model = pipeline("automatic-speech-recognition", model="nvidia/parakeet-ctc-0.6b")
|
7 |
|
8 |
def transcribe_audio(mic=None, file=None):
|
9 |
if mic is not None:
|
|
|
19 |
gr.Interface(
|
20 |
fn=transcribe_audio,
|
21 |
inputs=[
|
22 |
+
gr.Audio(sources="microphone", type="numpy", optional=True),
|
23 |
+
gr.Audio(sources="upload", type="filepath", optional=True),
|
24 |
],
|
25 |
outputs="text",
|
26 |
).launch()
|