Windows Server 2008:语音运行时 - 我缺少什么?

发布于 2024-09-12 04:01:32 字数 1031 浏览 7 评论 0原文

我正在尝试使用 system.speech 让语音识别在 Windows Server 2008 上工作。

  1. 我在 Vista 上构建了一个使用 System.Speech.Recognition (SAPI 5.4) 的控制台应用程序。在这台机器上运行得很好。

  2. 尝试在 Windows Server 2008 x86 计算机上安装/执行它。它有.NET 3.5。 不走运...抛出错误 - 经过调查,发现 2008 默认情况下没有安装任何识别器。

  3. 安装了新的语音平台服务器运行时英语语言文件,以及 语音 SDK。这些都是大约一个月前发布的。据我了解,运行时包含与 WinServer 2008 兼容的识别器。

  4. 尝试再次运行我的应用程序,仍然没有找到识别器。

我可以看到安装了一个识别器dll: C:\Program Files (x86)\Common Files\microsoft shared\Speech\SR\v10.1\spsreng.dll

我做错了什么? :)

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? :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你如我软肋 2024-09-19 04:01:32

您需要使用 Microsoft.Speech.Recognition 才能使用 Speech Platform Server; System.Speech.Recognition 需要桌面识别引擎,该引擎在 Windows Server 上不可用。

服务器和桌面识别引擎是完全独立的。

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.

南风起 2024-09-19 04:01:32

假设您有一台可以复制的工作计算机,则可以让 System.Speech.Recognition 在 Windows Server 2008 上运行。我尝试了很多不同的方法,但没有成功,然后一些可怕的步骤却有效。我不确定其中哪一个是必要的,但最后一组步骤绝对是必要的。

以下是不起作用的内容的列表,但可能是起作用的先决条件:

  1. 从此链接安装了 Microsoft Speech Platform Runtime https://www.microsoft.com/en-us/download/details.aspx?id=27225
  2. 已安装美国英语语言包 MSSpeech_SR_en- US_TELE.msi 来自此处 https://www.microsoft.com /en-us/download/details.aspx?id=27224
  3. 安装了“Microsoft Speech Platform - 服务器运行时语言(版本 10.1)”,即 LangPacks\MSSpeech_SR_en-US_TELE.msi 文件
    从这里: https://www.microsoft.com/en -us/download/details.aspx?id=3971
  4. 使用以下说明安装了“桌面体验”功能:
    1. 启动服务器管理器(在“开始”菜单上,单击“服务器管理”)。
    2. 在详细信息窗格中,找到“功能摘要”区域,然后点击“添加功能”。
    3. 在“添加功能向导”中,单击以选中“桌面体验”复选框,然后单击“下一步”。
    4. 点击“安装”。
    5. 安装桌面体验功能后,单击“关闭”退出“添加功能向导”,然后单击“是”重新启动计算机。

这些都不起作用,所以我们最终基本上使用以下改编自的过程手动安装必要的文件和注册表设置
https://groups.google.com/forum/ #!topic/microsoft.public.speech_tech.sdk/YV_OcL0Boh0

这需要一台工作计算机(我的 Windows 7 计算机)来复制文件和注册表设置。在下面的说明中,我尝试安装一个我知道在我的机器上运行的特定识别器 MS-1033-80-DESK。如果您使用不同的识别器,您可能需要不同的步骤。您可以使用 SpeechRecognitionEngine.InstalledRecognizers() API 查看计算机上已安装的识别器。

  1. 不要覆盖现有文件(仅在出现提示时添加缺少的文件),将文件从工作 C:\Windows\Speech 文件夹复制到服务器的文件夹。您可能需要获得服务器上文件夹的所有权,并授予自己添加文件夹和文件的权限。
  2. 不要覆盖现有文件(仅在出现提示时添加丢失的文件),将文件从工作 C:\Windows\System32\Speech 复制到服务器的文件夹。您可能再次需要授予自己权限。
  3. 最后一步非常痛苦。您需要将所有相关注册表设置复制到服务器。我仅从 HKEY_LOCAL_MACHINE 和 HKEY_CLASSES_ROOT 主文件夹复制注册表设置。我通过在注册表中搜索与以下相关的条目来创建粘贴在下面的 .reg 文件:MS-1033-80-DESK、{DAC9F469-0C67-4643-9258-87EC128C5941}、spsreng、spsrx、srloc
    (不包括 HKEY_LOCAL_MACHINE\COMPONENTS\DerivedData\Components 中的条目除外)这些是识别器的名称、识别引擎的类 ID 以及与识别器相关的 dll。我不知道您是否可以使用我的注册表设置,或者是否必须创建自己的注册表设置。
    我创建并导入到我的服务器上的注册表中的注册表文件位于此处:
    https://pastebin.com/4w05SbbY

Stackoverflow 不允许我发布没有代码的 Pastebin 链接,而且我的链接太大,无法直接包含在这里,所以

fakeCode = 1;

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;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文