Update app.py
Browse files
app.py
CHANGED
|
@@ -154,12 +154,11 @@ def translate(message, lang):
|
|
| 154 |
return "Error, sorry!"
|
| 155 |
|
| 156 |
def transcribe(audio, lang, history, link):
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
if link is not None:
|
| 160 |
audio = get_soundfile(link)
|
| 161 |
if lang is None or lang == '':
|
| 162 |
-
lang = '
|
| 163 |
history = history or []
|
| 164 |
lang_code = LANGUAGES[lang]
|
| 165 |
text = pipe(audio)["text"]
|
|
|
|
| 154 |
return "Error, sorry!"
|
| 155 |
|
| 156 |
def transcribe(audio, lang, history, link):
|
| 157 |
+
|
| 158 |
+
if link != '':
|
|
|
|
| 159 |
audio = get_soundfile(link)
|
| 160 |
if lang is None or lang == '':
|
| 161 |
+
lang = 'english'
|
| 162 |
history = history or []
|
| 163 |
lang_code = LANGUAGES[lang]
|
| 164 |
text = pipe(audio)["text"]
|