microsoft / cognitive-services-speech-sdk-js

Microsoft Azure Cognitive Services Speech SDK for JavaScript
Other
261 stars 95 forks source link

When calling the speak_text_async function to synthesize text-to-speech, there is an extremely high probability of receiving a result with zero byte length. #842

Open liujuncn opened 2 months ago

liujuncn commented 2 months ago

What happened?

When calling the speak_text_async function to synthesize text-to-speech, there is an extremely high probability of receiving a result with zero byte length. This issue did not occur and the code executed perfectly fine just a month or two ago.

service_region = "eastus"
......
result = speech_synthesizer.speak_text_async(text).get()
stream = speechsdk.AudioDataStream(result)
stream.save_to_wav_file(f"/data/tts/{file_name}.ogg")

Since I couldn't locate the project repository for the Python SDK, and I suspect the issue lies with the service backend, I am reporting this bug here.

Similar issue and discussion: https://github.com/microsoft/cognitive-services-speech-sdk-js/issues/725 https://learn.microsoft.com/en-us/answers/questions/1186461/why-is-no-audio-data-returned-from-speech-sdk-spea

Version

1.36.0 (Latest)

What browser/platform are you seeing the problem on?

No response

Relevant log output

No response

yulin-li commented 1 month ago

@LinZhang-Support could you help to triage?