none
PlatformNotSupportedException was Unhandled RRS feed

  • Question

  • I got an error when developing TTS console application by using Microsoft speech engine. I used Microsoft.Speech.dll. The detail is

    No voice installed on the system or none available with the current security setting.

    My code:

            SpeechSynthesizer ss = new SpeechSynthesizer();         
    
            List<string> lst = new List<string>();
            foreach (InstalledVoice voice in ss.GetInstalledVoices()) // error here
            {
                lst.Add(voice.VoiceInfo.Name);
            }  
          

    My desktop OS is Windows 7 Professional 64 bit.I believe that I installed SpeechPlatformRuntime etc, Also, my project Platform target is x64.

    Some online discussions such as http://stackoverflow.com/questions/7021200/no-voice-installed-on-the-system-or-none-available-with-the-current-security-setindicated that IIS's default settings only make applications partially trusted. But my application is desktop console project, it doesn't touch IIS since it is not asp.net application.

    Thanks for hint.

    Tuesday, July 8, 2014 1:22 AM

Answers

  • Hi Guys, I found the solution eventually. I downloaded the wrong Runtime languages, which are SR(Speech Recognition). It should be "Microsoft Server Speech Text to Speech Voice", after I downloaded en-US, ZiraPro and es-MX, Hinda, the error disappeared.

    The url is at Microsoft Download.

    • Marked as answer by ardmore Wednesday, July 9, 2014 12:16 PM
    Wednesday, July 9, 2014 12:16 PM

All replies

  • Hi Ardmore,

    Some devices are based on x86. Try to change the project platform target from “Any CPU” to “X86” in project property tab. Please let me know the result.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 8, 2014 8:04 AM
    Moderator
  • Then the error will be if switch it to x86.

    Retrieving the COM class factory for component with CLSID {D941651C-44E6-4C17-BADF-C36826FC3424} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    But I think that it should be x64 as my desktop is Windows 7 64 bit.

    Did I install wrong files? Would you please look at link.

    Also I went to the registry, I haven't found 
    D941651C-44E6-4C17-BADF-C36826FC3424
    • Edited by ardmore Tuesday, July 8, 2014 7:01 PM add
    Tuesday, July 8, 2014 12:16 PM
  • Hi Ardmore,

    I’ve done some research on this topic. I found there are two assemblies about speech. Microsoft.Speech.dll and System.Speech. You can see the differences between them from http://stackoverflow.com/questions/2977338/what-is-the-difference-between-system-speech-recognition-and-microsoft-speech-re/2982910#2982910.

    So try to use System.Speech.dll and run you app again. You can find code example from http://code.msdn.microsoft.com/windowsdesktop/Text-to-Speech-Converter-0ed77dd5. I’ve tested it and it worked fine on my side. Please let me know the result.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Wednesday, July 9, 2014 5:41 AM
    Moderator
  • hi,

    If you are having com class factory error after changing the platform in to X86 from Any CPU, That is because the dll you cant build X86 dll on 64bit platform.

    My Suggestion is download the 'Microsoft Speech Platform SDK (x64)' Change the platform settings on the project to 64 Bit and refer 64 bit version 'Microsoft.Speech.dll' to your project. 

    Wednesday, July 9, 2014 6:07 AM
  • Hi Guys, I found the solution eventually. I downloaded the wrong Runtime languages, which are SR(Speech Recognition). It should be "Microsoft Server Speech Text to Speech Voice", after I downloaded en-US, ZiraPro and es-MX, Hinda, the error disappeared.

    The url is at Microsoft Download.

    • Marked as answer by ardmore Wednesday, July 9, 2014 12:16 PM
    Wednesday, July 9, 2014 12:16 PM