Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ transcriber = pipeline(model="openai/whisper-small", task="automatic-speech-reco
|
|
| 6 |
|
| 7 |
# Define the transcription function
|
| 8 |
def transcribe_audio(audio):
|
| 9 |
-
# The audio input comes in as a
|
| 10 |
result = transcriber(audio, generate_kwargs={"language": "<|en|>"})
|
| 11 |
return result['text']
|
| 12 |
|
|
@@ -15,7 +15,7 @@ with gr.Blocks() as demo:
|
|
| 15 |
gr.Markdown("## Whisper Small - Audio Transcription (English)")
|
| 16 |
|
| 17 |
# Create a file uploader and a text output
|
| 18 |
-
audio_input = gr.Audio(
|
| 19 |
text_output = gr.Textbox(label="Transcribed Text")
|
| 20 |
|
| 21 |
# Create a button to trigger transcription
|
|
|
|
| 6 |
|
| 7 |
# Define the transcription function
|
| 8 |
def transcribe_audio(audio):
|
| 9 |
+
# The audio input comes in as a file path
|
| 10 |
result = transcriber(audio, generate_kwargs={"language": "<|en|>"})
|
| 11 |
return result['text']
|
| 12 |
|
|
|
|
| 15 |
gr.Markdown("## Whisper Small - Audio Transcription (English)")
|
| 16 |
|
| 17 |
# Create a file uploader and a text output
|
| 18 |
+
audio_input = gr.Audio(type="filepath", label="Upload Audio File")
|
| 19 |
text_output = gr.Textbox(label="Transcribed Text")
|
| 20 |
|
| 21 |
# Create a button to trigger transcription
|