Yusin commited on
Commit
2418a12
1 Parent(s): 82346b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- voice_out = fp.name
48
- return whisper_text, gpt_response, voice_out
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):