Closed cnkang closed 3 months ago
Hi, Raspbian OS / Raspberry Pi OS is not supported by the Speech SDK (and there's no plan for it). You should install Ubuntu or some other supported Linux distribution as documented in https://learn.microsoft.com/en-us/azure/ai-services/speech-service/quickstarts/setup-platform?tabs=linux&pivots=programming-language-python#platform-requirements
Also note that currently a Linux environment still needs to have OpenSSL 1.x (as the distributions listed in the platform requirements do) in order to use the Speech SDK. Support for 3.x will be added in the next SDK release.
IN ORDER TO ASSIST YOU, PLEASE PROVIDE THE FOLLOWING:
def main(): speech_config = speechsdk.SpeechConfig(subscription=os.getenv("AZURE_SPEECH_KEY"), region=os.getenv("AZURE_SPEECH_REGION")) speech_config.speech_synthesis_voice_name = os.getenv("VOICE_NAME", "zh-CN-XiaoxiaoMultilingualNeural") audio_config = speechsdk.audio.AudioOutputConfig(use_default_speaker=True) try: synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=audio_config) print("Synthesizer initialized successfully.") except Exception as e: print(f"Failed to initialize synthesizer: {e}")
if name == 'main': main()