OuroborosM commited on
Commit
f38cdce
·
1 Parent(s): f65f35d

correct bug

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -334,7 +334,7 @@ def speech_to_text(Filename_Audio_input_single):
334
 
335
  response = requests.post(endpoint, headers=headers, data=open(Filename_Audio_input_single, "rb"))
336
  print("Speech to Text Raw: ", response.text)
337
- text_from_audio = response.text.split('DisplayText":"')[1].split('."}')[0]
338
  # text_from_audio = response.text('DisplayText')
339
  print("Speech to Text: ", text_from_audio)
340
  return text_from_audio
@@ -906,6 +906,7 @@ def SingleTalk(WavFile, history5):
906
  history5 = history5 + [(ConvertText, None)]
907
  yield [None, None, history5]
908
  message = ConvertText
 
909
  try:
910
  response = agent.run(message)
911
  time.sleep(0.1)
 
334
 
335
  response = requests.post(endpoint, headers=headers, data=open(Filename_Audio_input_single, "rb"))
336
  print("Speech to Text Raw: ", response.text)
337
+ text_from_audio = response.text.split('DisplayText":"')[1].split('"}')[0]
338
  # text_from_audio = response.text('DisplayText')
339
  print("Speech to Text: ", text_from_audio)
340
  return text_from_audio
 
906
  history5 = history5 + [(ConvertText, None)]
907
  yield [None, None, history5]
908
  message = ConvertText
909
+ history2 = history5
910
  try:
911
  response = agent.run(message)
912
  time.sleep(0.1)