SpeechSynthesizer.SelectVoice() Fails with “No matching voice is installed or the voice was disabled”

后端 未结 4 1602
無奈伤痛
無奈伤痛 2020-12-11 11:25

I am modifying Scott Hanselman\'s BabySmash code to support other languages.

  1. I installed the speech platform and a new language per these steps.
  2. Th

相关标签:
4条回答
  • 2020-12-11 11:55

    ha ha I feel special: this post on Python actually solved my problem: build configuration platform needs to be x64, not Any CPU!

    0 讨论(0)
  • 2020-12-11 11:59

    Another solution is to install (x64) bits version of Microsoft Speech Platform SDK and Microsoft Server Speech Platform Runtime. I think that you had installed (x86) bits of both and the plataform try to read it in (x64) bits.

    I had the same problem that you but on the contrary and this works to me!

    0 讨论(0)
  • 2020-12-11 12:14

    In my case Instead of the library System.Speech.Synthesis i need to use Microsoft.Speech.Synthesis. For that we need to go to Solution Explorer on VisualStudio --> References and Browse for Microsoft.Speech.dll

    using Microsoft.Speech.Synthesis;
    

    After that you will have other Runtime Languages available.

            SpeechSynthesizer synth = new SpeechSynthesizer();    
    
            // Output information about all of the installed voices. 
            foreach (InstalledVoice voice in synth.GetInstalledVoices())
            {
                VoiceInfo info = voice.VoiceInfo;
    
                Console.WriteLine(" Name:          " + info.Name);
                Console.WriteLine(" Culture:       " + info.Culture);
                Console.WriteLine(" Age:           " + info.Age);
                Console.WriteLine(" Gender:        " + info.Gender);
                Console.WriteLine(" Description:   " + info.Description);
                Console.WriteLine(" ID:            " + info.Id);
            }
    
    0 讨论(0)
  • 2020-12-11 12:22

    changing the user identity to Localsystem solve my problem !

    0 讨论(0)
提交回复
热议问题