Spaces:
Sleeping
Sleeping
Samuel L Meyers
commited on
Commit
·
5ab9c18
1
Parent(s):
be68991
We should probably use the correct stt function
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ stt_pipe = pipeline(
|
|
37 |
model="openai/whisper-large-v3",
|
38 |
)
|
39 |
|
40 |
-
def
|
41 |
if audio is None:
|
42 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
43 |
text = stt_pipe(audio, generate_kwargs={"language": "english", "task": "transcribe"})["text"]
|
@@ -109,7 +109,7 @@ def main():
|
|
109 |
audio = gr.Audio()
|
110 |
with gr.Row(variant="panel"):
|
111 |
mf_transcribe = gr.Interface(
|
112 |
-
|
113 |
gr.Audio(source="microphone", type="filepath"),
|
114 |
outputs="text",
|
115 |
title="Transcribe",
|
|
|
37 |
model="openai/whisper-large-v3",
|
38 |
)
|
39 |
|
40 |
+
def transcribe_stt(audio):
|
41 |
if audio is None:
|
42 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
43 |
text = stt_pipe(audio, generate_kwargs={"language": "english", "task": "transcribe"})["text"]
|
|
|
109 |
audio = gr.Audio()
|
110 |
with gr.Row(variant="panel"):
|
111 |
mf_transcribe = gr.Interface(
|
112 |
+
transcribe_stt,
|
113 |
gr.Audio(source="microphone", type="filepath"),
|
114 |
outputs="text",
|
115 |
title="Transcribe",
|