Han Lee
commited on
Commit
·
07b5bcb
1
Parent(s):
790df10
translation removed
Browse files
app.py
CHANGED
@@ -28,13 +28,16 @@ def main(audio: object):
|
|
28 |
- html (object) : autoplayer for bot's speech
|
29 |
"""
|
30 |
user_speech_text = stt(audio, desired_language)
|
31 |
-
tranlated_text = to_en_translation(user_speech_text, desired_language)
|
32 |
-
bot_response_en = response_generator_pipe(tranlated_text)
|
33 |
-
|
34 |
-
|
|
|
|
|
35 |
bot_voice_bytes = tts_to_bytesio(bot_voice)
|
36 |
html = html_audio_autoplay(bot_voice_bytes)
|
37 |
-
return user_speech_text, bot_response_de, bot_response_en, html
|
|
|
38 |
|
39 |
|
40 |
Interface(
|
@@ -47,8 +50,8 @@ Interface(
|
|
47 |
],
|
48 |
outputs=[
|
49 |
Textbox(label="You said: "),
|
50 |
-
Textbox(label="
|
51 |
-
Textbox(label="
|
52 |
"html",
|
53 |
],
|
54 |
live=True,
|
|
|
28 |
- html (object) : autoplayer for bot's speech
|
29 |
"""
|
30 |
user_speech_text = stt(audio, desired_language)
|
31 |
+
# tranlated_text = to_en_translation(user_speech_text, desired_language)
|
32 |
+
# bot_response_en = response_generator_pipe(tranlated_text)
|
33 |
+
bot_response_en = response_generator_pipe(user_speech_text)
|
34 |
+
# bot_response_de = from_en_translation(bot_response_en, desired_language)
|
35 |
+
# bot_voice = tts(bot_response_de, desired_language)
|
36 |
+
bot_voice = tts(bot_response_en, desired_language)
|
37 |
bot_voice_bytes = tts_to_bytesio(bot_voice)
|
38 |
html = html_audio_autoplay(bot_voice_bytes)
|
39 |
+
# return user_speech_text, bot_response_de, bot_response_en, html
|
40 |
+
return user_speech_text, bot_response_en, html
|
41 |
|
42 |
|
43 |
Interface(
|
|
|
50 |
],
|
51 |
outputs=[
|
52 |
Textbox(label="You said: "),
|
53 |
+
# Textbox(label="Santa said: "),
|
54 |
+
Textbox(label="Santa said (English): "),
|
55 |
"html",
|
56 |
],
|
57 |
live=True,
|