C#  如何获取 语音选择理的 语音列表请教各位大侠

解决方案 »

  1.   

    没弄过,搜sapi看看有没有相关的api看看吧
      

  2.   


                using SpeechLib;            SpVoiceClass voice = new SpVoiceClass();
                var voices = voice.GetVoices(null, null);
                for (int i = 0; i < voices.Count; i++)
                {
                    string voidId = voices.Item(i).Id;
                    string voiceName = voices.Item(i).GetDescription(0);
                }
    voiceName就是你要的。比如要用截图里选中项来读,则:            if (voiceName == "Microsoft Simplified Chinese")
                voice.Voice = voices.Item(i);
                voice.Rate = 4;
                voice.Speak("测试", SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);