Cognitive-Speech-TTS icon indicating copy to clipboard operation
Cognitive-Speech-TTS copied to clipboard

May has a bug in save_to_wav_file

Open panxin801 opened this issue 1 year ago • 1 comments

Hello, I'm using azure tts servuce with python. When I finish one inference with speechsdk, and then I want to save to file, I get the following error. image

stream is the picture return from the following code

if result.reason == speechsdk.ResultReason.SynthesizingAudioCompleted:
        if len(result.audio_data) == 0:
            raise ValueError('[ERROR] empty audio data.')
        else:
            stream = speechsdk.AudioDataStream(result)
            return stream

I meet the error this morning the first time, but I can't figure out what's wrong with this error. Thank you fir your reply.

panxin801 avatar Feb 21 '24 03:02 panxin801