Aaron
Aaron

Reputation: 127

Windows Server 2008 : Speech Runtime - What am I missing?

I am trying to get Speech Recognition to work on Windows Server 2008 using system.speech.

  1. I built a console application which uses System.Speech.Recognition (SAPI 5.4) on Vista. Works great on this machine.

  2. Tried to install/execute it on a Windows Server 2008 x86 machine. It has .NET 3.5. No luck... Threw errors--Upon investigation, discovered that 2008 doesn't have any recognizers installed by default.

  3. Installed the new Speech Platform Server Runtime, English language file, and Speech SDK. These were all released about a month ago. As I understand it, the runtime contains a recognizer compatible with WinServer 2008.

  4. Tried to run my application again, and there are still no recognizers found.

I can see that there is a recognizer dll installed at: C:\Program Files (x86)\Common Files\microsoft shared\Speech\SR\v10.1\spsreng.dll

What am I doing wrong? :)

Upvotes: 2

Views: 3119

Answers (2)

user12861
user12861

Reputation: 2426

It is possible to get System.Speech.Recognition working on Windows Server 2008 assuming you have a working machine to copy from. I tried a bunch of different things that didn't work, and then some scary steps that did work. I don't know for sure which of these are necessary, but the last set of steps definitely were necessary.

Here is the list of things that did not work, but may have been prerequisites for what did work:

  1. Installed Microsoft Speech Platform Runtime from this link https://www.microsoft.com/en-us/download/details.aspx?id=27225
  2. Installed English-US language pack MSSpeech_SR_en-US_TELE.msi from here https://www.microsoft.com/en-us/download/details.aspx?id=27224
  3. Installed "Microsoft Speech Platform - Server Runtime Languages (Version 10.1)", the LangPacks\MSSpeech_SR_en-US_TELE.msi file from here: https://www.microsoft.com/en-us/download/details.aspx?id=3971
  4. Installed the "Desktop Experience" feature using these instructions:
    1. Start Server Manager (On the Start menu, click Server Management).
    2. In the details pane, locate the Features Summary area, and then click Add Features.
    3. In the Add Features Wizard, click to select the Desktop Experience check box, and then click Next.
    4. Click Install.
    5. After the Desktop Experience feature is installed, click Close to exit the Add Features Wizard, and then click Yes to restart the computer.

None of that worked, so we ended up basically manually installing the necessary files and registry settings using the process below adapted from https://groups.google.com/forum/#!topic/microsoft.public.speech_tech.sdk/YV_OcL0Boh0

This required a working machine (my Windows 7 machine) to copy files and registry settings from. In the instructions below I was trying to install a specific recognizer that I knew was working on my machine, MS-1033-80-DESK. If you are using a different recognizer you may need different steps. You can see installed recognizers on your machine using the SpeechRecognitionEngine.InstalledRecognizers() API.

  1. Without overwriting existing files (only add missing files if prompted), copy files from your working C:\Windows\Speech folder to the server's folder. You may need to take ownership of the folder on the server and grant yourself permissions to add folders and files.
  2. Without overwriting existing files (only add missing files if prompted), copy files from your working C:\Windows\System32\Speech to the server's folder. You again may need to grant yourself permissions.
  3. The last step is very painful. You need to copy all relevant registry settings to the server. I only copied registry settings from the HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT main folders. I created the .reg file I have pasted below by searching the registry for entries related to: MS-1033-80-DESK, {DAC9F469-0C67-4643-9258-87EC128C5941}, spsreng, spsrx, srloc (except entries in HKEY_LOCAL_MACHINE\COMPONENTS\DerivedData\Components were not included) These are the name of the recognizer, the class ID of the recognition engine, and the dll's related to the recognizer. I don't know if you can use my registry settings or if you have to create your own. The registry file I created and imported into the registry on my server is here: https://pastebin.com/4w05SbbY

Stackoverflow won't let me post a pastebin link without code, and my link is to big to include here directly, so

fakeCode = 1;

Upvotes: 1

Eric Brown
Eric Brown

Reputation: 13942

You need to use Microsoft.Speech.Recognition in order to use Speech Platform Server; System.Speech.Recognition requires the Desktop recognition engine, which isn't available on Windows Server.

The Server and Desktop recognition engines are completely separate.

Upvotes: 4

Related Questions