none
中国区 Speech Service 如何使用SDK调用 RRS feed

  • 问题

  • 我在中国东部2建立了一个speech服务,以便调用中文的TTS。但是TTS无法输出,状态直接报canceled。 切换到global的service可以用。但是业务场景需要在国内。请问如何正确的使用国服的speechservice?
      private static SpeechSynthesizer speechSynthesizer;
    
            public static async Task SynthesisToSpeakerAsync(string text)
            {
                if (speechSynthesizer == null)
                {
                    // Creates an instance of a speech config with specified subscription key and service region.
                    // Replace with your own subscription key and service region (e.g., "westus").
                    var config = SpeechConfig.FromSubscription("somekey", "chinaeast2");
                    config.SpeechSynthesisLanguage = "zh-CN";
    
                    speechSynthesizer = new SpeechSynthesizer(config);
                }
    
                 await speechSynthesizer.SpeakTextAsync(text);               
                }
            }


    MSC on Computer Science (Parallel algorithm)

    2019年12月8日 5:00