Spaces:
Runtime error
Runtime error
small change
Browse files
app.py
CHANGED
@@ -104,10 +104,11 @@ def translate(audio, url, seconds_max, target_lang):
|
|
104 |
return text
|
105 |
|
106 |
else:
|
|
|
107 |
text = "[Transcription]\n"
|
108 |
-
text +=
|
109 |
-
text += f"
|
110 |
-
text += get_translation(
|
111 |
|
112 |
return text
|
113 |
|
|
|
104 |
return text
|
105 |
|
106 |
else:
|
107 |
+
transcribed_text = pipe(audio)["text"]
|
108 |
text = "[Transcription]\n"
|
109 |
+
text += f"{transcribed_text}\n"
|
110 |
+
text += f"[Translation to {target_lang}]\n"
|
111 |
+
text += get_translation(transcribed_text, target_lang)
|
112 |
|
113 |
return text
|
114 |
|