I'm trying to use text-to-speech from Azure in combination with movie.py
to create the audio stream for a video.
result = synthesizer.speak_ssml_async(xml_string).get()
stream = AudioDataStream(result)
The output of this process is:
<azure.cognitiveservices.speech.AudioDataStream at 0x2320cb87ac0>
However, movie.py
is not able to import this with the following command:
audioClip = AudioFileClip(stream)
This is giving me the error:
AudioDataStream' object has no attribute 'endswith'
Do I need to convert the Azure Stream to .wav
? How do I do that? I need to do the entire process without writing .wav
files locally (e.g. stream.save_to_wav_file
) but just using the memory streams.
Can someone spot a light, please?