Spaces:
Runtime error
Runtime error
Fix bug
Browse files
app.py
CHANGED
|
@@ -104,7 +104,7 @@ def translate(audio, url, seconds_max, target_lang):
|
|
| 104 |
return text
|
| 105 |
|
| 106 |
else:
|
| 107 |
-
text =
|
| 108 |
text += pipe(audio)["text"]
|
| 109 |
text += f"\n[Translation to {target_lang}]\n"
|
| 110 |
text += get_translation(text, target_lang)
|
|
@@ -121,7 +121,7 @@ iface = gr.Interface(
|
|
| 121 |
],
|
| 122 |
outputs="text",
|
| 123 |
title="Whisper Small Swedish",
|
| 124 |
-
description="Realtime demo for Swedish speech recognition with translation using a fine-tuned Whisper small model.
|
| 125 |
)
|
| 126 |
|
| 127 |
iface.launch()
|
|
|
|
| 104 |
return text
|
| 105 |
|
| 106 |
else:
|
| 107 |
+
text = "[Transcription]\n"
|
| 108 |
text += pipe(audio)["text"]
|
| 109 |
text += f"\n[Translation to {target_lang}]\n"
|
| 110 |
text += get_translation(text, target_lang)
|
|
|
|
| 121 |
],
|
| 122 |
outputs="text",
|
| 123 |
title="Whisper Small Swedish",
|
| 124 |
+
description="Realtime demo for Swedish speech recognition with translation using a fine-tuned Whisper small model.\nChoose EITHER a YouTube URL or use the microphone to record the audio to translate.",
|
| 125 |
)
|
| 126 |
|
| 127 |
iface.launch()
|