Spaces:
Runtime error
Runtime error
Edward Nagy
commited on
Commit
•
691f320
1
Parent(s):
f9bd2ea
Fix typo in transcribe_audio function
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import os
|
|
7 |
# pipe = pipeline(model="esnagy/whisper-small-hu")
|
8 |
|
9 |
def transcribe_audio(audio_file):
|
10 |
-
text = "
|
11 |
# text = pipe(audio_file)["text"]
|
12 |
os.remove(audio_file) # Remove temporary audio file
|
13 |
return text
|
@@ -38,13 +38,13 @@ def transcribe(input_data):
|
|
38 |
|
39 |
return text
|
40 |
|
|
|
|
|
|
|
41 |
iface = gr.Interface(
|
42 |
fn=transcribe,
|
43 |
-
inputs=[
|
44 |
-
|
45 |
-
gr.Input("audio", label="Or record your voice", name="audio", source="microphone")
|
46 |
-
],
|
47 |
-
outputs=gr.Output("text"),
|
48 |
title="Whisper Small Hungarian",
|
49 |
description="Realtime demo for Hungarian speech recognition using a fine-tuned Whisper small model. Enter a video URL or record your voice to transcribe."
|
50 |
)
|
|
|
7 |
# pipe = pipeline(model="esnagy/whisper-small-hu")
|
8 |
|
9 |
def transcribe_audio(audio_file):
|
10 |
+
text = "Test text"
|
11 |
# text = pipe(audio_file)["text"]
|
12 |
os.remove(audio_file) # Remove temporary audio file
|
13 |
return text
|
|
|
38 |
|
39 |
return text
|
40 |
|
41 |
+
video_url_input = gr.inputs.Textbox(label="Enter video URL", placeholder="Or leave empty to use microphone")
|
42 |
+
audio_input = gr.inputs.Audio(label="Or record your voice", source="microphone")
|
43 |
+
|
44 |
iface = gr.Interface(
|
45 |
fn=transcribe,
|
46 |
+
inputs=[video_url_input, audio_input],
|
47 |
+
outputs=gr.outputs.Textbox(),
|
|
|
|
|
|
|
48 |
title="Whisper Small Hungarian",
|
49 |
description="Realtime demo for Hungarian speech recognition using a fine-tuned Whisper small model. Enter a video URL or record your voice to transcribe."
|
50 |
)
|