gorkemgoknar commited on
Commit
282f76d
·
1 Parent(s): 2323879

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -212,7 +212,14 @@ def greet_stt_to_tts(character,your_voice,history):
212
  message = stt_record(your_voice)
213
 
214
  response = get_chat_response(character,history=history["message_history"],input_txt=message)
215
- os.system('tts --text "'+response+'" --model_name tts_models/multilingual/multi-dataset/your_tts --speaker_wav '+your_voice+' --language_idx "en"')
 
 
 
 
 
 
 
216
 
217
  history["message_history"].append((message, response))
218
 
 
212
  message = stt_record(your_voice)
213
 
214
  response = get_chat_response(character,history=history["message_history"],input_txt=message)
215
+ print("Response:",response)
216
+
217
+ if type(response) == tuple:
218
+ # only get first
219
+ response = response[0]
220
+ print("Response only first:",response)
221
+
222
+ os.system('tts --text "'+str(response)+'" --model_name tts_models/multilingual/multi-dataset/your_tts --speaker_wav '+your_voice+' --language_idx "en"')
223
 
224
  history["message_history"].append((message, response))
225