Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,9 +36,9 @@ def chat_hf(audio, custom_token, language):
|
|
36 |
|
37 |
# to voice
|
38 |
if language == 'cn' or 'jp':
|
39 |
-
text = infer.clean_text(gpt_response)
|
40 |
-
|
41 |
-
|
42 |
else:
|
43 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
44 |
coquiTTS.get_tts(gpt_response, fp, speaker = {"language" : language})
|
|
|
36 |
|
37 |
# to voice
|
38 |
if language == 'cn' or 'jp':
|
39 |
+
#text = infer.clean_text(gpt_response)
|
40 |
+
audio = infer.infer(gpt_response, net_g_ms, 2, "demo")
|
41 |
+
voice_out = (hps.data.sampling_rate, audio)
|
42 |
else:
|
43 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
44 |
coquiTTS.get_tts(gpt_response, fp, speaker = {"language" : language})
|