OuroborosM commited on
Commit
d79de75
·
1 Parent(s): b87aac4

correct dict error

Browse files
Files changed (1) hide show
  1. app.py +1 -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['DisplayText']
338
  print("Speech to Text: ", text_from_audio)
339
  return text_from_audio
340
  except requests.exceptions.RequestException as e:
 
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('DisplayText')
338
  print("Speech to Text: ", text_from_audio)
339
  return text_from_audio
340
  except requests.exceptions.RequestException as e: