I'm working on a chatbot that uses Azure SpeechRecognizer and SpeechSynthesizer to talk with users. After 5-10 turns, the chatbot stops talking mid-utterance, even though I get a ResultReason.SynthesizingAudioCompleted status on the entire sentence.
For example, the chatbot only says "That sounds great." even when I'm passing in "That sounds great. Tell me more" and the ResultReason.SynthesizingAudioCompleted status is returned for the whole utterance. (the commented out code is stuff I tried but it didn't change this behavior)
result = speech_synthesizer.speak_text(chatbot_utterance)
# result = speech_synthesizer.speak_text_async(chatbot_utterance).get()
if result.reason == speechsdk.ResultReason.SynthesizingAudioCompleted:
print("Speech synthesized to speaker for text [{}]".format(mindmeld_response))
# speech_synthesizer.stop_speaking_async()
I've been googling about this for a while, but I'm not going over the rate limits (This calls the speech synthesizer once every few seconds) and I don't know what other possible issues there might be. Does anyone have any ideas as to what might be going wrong?
These are the packages I'm using and I'm working on a MacOS with Python 3.7.
azure-cognitiveservices-speech 1.20.0
azure-common 1.1.28
azure-core 1.24.0
azure-identity 1.10.0
azure-mgmt-core 1.3.0
azure-mgmt-media 9.0.0
azure-storage-blob 12.12.0