Hi @kyle foley,
I'm glad I could help and thanks for the response, which might be beneficial to other community members reading this thread. Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.
Question: error in the azure.cognitiveservices.speech python module
Answer:
import azure.cognitiveservices.speech as speechsdk
# Set up the speech configuration
speech_config = speechsdk.SpeechConfig(subscription="<Your_Subscription>", region="<Your_region>")
speech_config.speech_synthesis_language = "en-US"
speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
# Set up the audio output format
audio_config = speechsdk.audio.AudioOutputConfig(filename="<output-file-name>.mp3")
# Create a synthesizer object
synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=audio_config)
# Read the input text from a file
with open(r"<input-file-name>.txt", "r") as f:
input_text = f.read()
# Convert the text to speech
synthesizer.speak_text_async(input_text)
-------If this answers your query, do click Accept Answer
and Yes
for was this answer helpful.