speechkitcloud icon indicating copy to clipboard operation
speechkitcloud copied to clipboard

python asr is crushing with error future not responding and other issues

Open Mega4alik opened this issue 7 years ago • 0 comments

Добрый день, все работало без перебоев пока не были внесены изменения в default_callback

Программа падает регулярно выдавaя разного рода ошибки как "future not running"

def default_callback(utterance, start_time = 0.0, end_time = 0.0, data = None):
  click.echo(utterance)   
  client.stream_stop()  #stream.stop_stream()     
  try:          
    ans = get_df_response(utterance) #curl request
    client.yandex_tts(clean_text(ans))    #curl 
    client.write_data_to_pyaudio() #play wav file with pyaudio 
  except Exception as e:
    print(e)
  client.stream_start()   #stream.start_stream()     

Mega4alik avatar Oct 24 '18 05:10 Mega4alik