0

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

1 Answers1

0

This behavior indicates the free tier limits are breached. Although from the user point of view they might have not exceeded 0.5 million characters/month under TTS but the transaction rate is what makes the output limited. Please see the limits under TTS here. It is most likely the 20 transactions/second limit is breached. To confirm this you can request customer to change the pricing tier on their speech resource to Standard and test the same text or utterances. If it works fine then they need to stay on standard tier or stagger the free tier requests further.

Sairam Tadepalli
  • 1,563
  • 1
  • 3
  • 11