update
Browse files
app.py
CHANGED
|
@@ -59,13 +59,13 @@ def driver_fun(audio) :
|
|
| 59 |
|
| 60 |
#For now only taking in English text for Bloom prompting as inference model is not high spec
|
| 61 |
text_generated = lang_model_response(transcribe, lang)
|
| 62 |
-
|
| 63 |
|
| 64 |
if lang in ['es', 'fr']:
|
| 65 |
speech = tts(text_generated, lang)
|
| 66 |
else:
|
| 67 |
speech = tts(text_generated_en, 'en') #'en')
|
| 68 |
-
return transcribe, translation,
|
| 69 |
|
| 70 |
|
| 71 |
# Whisper - speech-to-text
|
|
|
|
| 59 |
|
| 60 |
#For now only taking in English text for Bloom prompting as inference model is not high spec
|
| 61 |
text_generated = lang_model_response(transcribe, lang)
|
| 62 |
+
text_generated_en = lang_model_response(translation, 'en')
|
| 63 |
|
| 64 |
if lang in ['es', 'fr']:
|
| 65 |
speech = tts(text_generated, lang)
|
| 66 |
else:
|
| 67 |
speech = tts(text_generated_en, 'en') #'en')
|
| 68 |
+
return transcribe, translation, text_generated, text_generated_en, speech
|
| 69 |
|
| 70 |
|
| 71 |
# Whisper - speech-to-text
|