Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ from langdetect import detect
|
|
4 |
|
5 |
def process_audio(audio_path):
|
6 |
try:
|
7 |
-
# Transcription
|
8 |
asr = pipeline("automatic-speech-recognition", model="openai/whisper-large")
|
9 |
result = asr(audio_path)
|
10 |
transcript = result["text"]
|
@@ -38,7 +37,7 @@ def process_audio(audio_path):
|
|
38 |
|
39 |
with gr.Blocks() as demo:
|
40 |
gr.Markdown("## Audio Transcript, Translation & Summary (Whisper + Hugging Face)")
|
41 |
-
audio_input = gr.Audio(
|
42 |
btn = gr.Button("Process")
|
43 |
lang_out = gr.Textbox(label="Detected Language")
|
44 |
transcript_out = gr.Textbox(label="Original Transcript")
|
|
|
4 |
|
5 |
def process_audio(audio_path):
|
6 |
try:
|
|
|
7 |
asr = pipeline("automatic-speech-recognition", model="openai/whisper-large")
|
8 |
result = asr(audio_path)
|
9 |
transcript = result["text"]
|
|
|
37 |
|
38 |
with gr.Blocks() as demo:
|
39 |
gr.Markdown("## Audio Transcript, Translation & Summary (Whisper + Hugging Face)")
|
40 |
+
audio_input = gr.Audio(type="filepath", label="Upload MP3/WAV Audio")
|
41 |
btn = gr.Button("Process")
|
42 |
lang_out = gr.Textbox(label="Detected Language")
|
43 |
transcript_out = gr.Textbox(label="Original Transcript")
|