Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,11 +41,12 @@ def chat_hf(audio, custom_token, language):
|
|
41 |
text = infer.clean_text(text)
|
42 |
audio = infer.infer(text, net_g_ms, 0, "demo")
|
43 |
voice_out = (hps.data.sampling_rate, audio)
|
|
|
44 |
else:
|
45 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
46 |
coquiTTS.get_tts(gpt_response, fp, speaker = {"language" : language})
|
47 |
-
|
48 |
-
|
49 |
|
50 |
|
51 |
def translate(audio):
|
|
|
41 |
text = infer.clean_text(text)
|
42 |
audio = infer.infer(text, net_g_ms, 0, "demo")
|
43 |
voice_out = (hps.data.sampling_rate, audio)
|
44 |
+
return whisper_text, gpt_response, voice_out
|
45 |
else:
|
46 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
47 |
coquiTTS.get_tts(gpt_response, fp, speaker = {"language" : language})
|
48 |
+
return whisper_text, gpt_response, fp.name
|
49 |
+
|
50 |
|
51 |
|
52 |
def translate(audio):
|