speechkitcloud
speechkitcloud copied to clipboard
python asr is crushing with error future not responding and other issues
Добрый день, все работало без перебоев пока не были внесены изменения в 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()