Question
You are developing an application that converts text into spoken audio and saves the synthesized audio to a file by using Azure Speech in Foundry Tools.
How should you complete the Python code? To answer, select the appropriate option in the answer area.
NOTE: Each correct selection is worth one point.
Explanation
To save synthesized speech to a file, the audio output must be directed to a file rather than a speaker. AudioOutputConfig(filename="output.wav") creates an audio configuration that writes the generated audio to the specified WAV file, which is then passed to the SpeechSynthesizer. Using a device or default speaker configuration would play the audio instead of persisting it.