From a762fc9e8b855844f5b9561af0bb8314abe0ae61 Mon Sep 17 00:00:00 2001 From: szhaomsft Date: Wed, 2 Oct 2024 13:24:13 +0800 Subject: [PATCH] Update doctopodcast.py --- doctopodcast/doctopodcast.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doctopodcast/doctopodcast.py b/doctopodcast/doctopodcast.py index c7ecb70..9e596cf 100644 --- a/doctopodcast/doctopodcast.py +++ b/doctopodcast/doctopodcast.py @@ -105,8 +105,7 @@ def CreatePodcastSsml(text): def GenerateAudio(ssml, outaudio): import azure.cognitiveservices.speech as speechsdk import os - # speech_config = speechsdk.SpeechConfig(subscription=speech_key, region=service_region) - speech_config = speechsdk.SpeechConfig(subscription=os.getenv("SUBSCRIPTION_KEY_DEV"), endpoint="https://dev.tts-frontend.speech-test.microsoft.com/synthesize/internal?traffictype=videodubber") + speech_config = speechsdk.SpeechConfig(subscription=speech_key, region=service_region) # Creates an audio configuration that points to an audio file. audio_output = speechsdk.audio.AudioOutputConfig(filename=outaudio) @@ -233,4 +232,4 @@ def GeneratePodcastFromUrl(url, outaudio = None): # main func if __name__ == "__main__": GeneratePodcastFromUrl("https://kyutai.org/Moshi.pdf") - \ No newline at end of file +