System.Speech.Recognition选择识别配置文件 [英] System.Speech.Recognition Choosing Recognition Profile

查看:205
本文介绍了System.Speech.Recognition选择识别配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何从.NET应用程序更改识别配置文件?

Does anyone know how to change recognition profiles from within a .NET application?

我写的确实使用了System.Speech.Recognition命名空间中的功能语音识别.NET应用程序。我正在馈送到系统中的音频来自多个不同的用户。我希望能培养系统,以更准确地从各个不同的用户识别语音。

I am writing a .NET application that does speech recognition using the capabilities found in the System.Speech.Recognition namespace. The audio that I am feeding into the system comes from multiple different users. I would like to be able to train the system to more accurately recognize speech from each of the different users.

我已经找到了语音识别控制面板窗口(Windows 7中在这种情况下),在那里我可以配置的培训文件。设置一个配置文件为自己和做培训的过程显著提高了识别的准确性。所以我可以为每个用户设置的配置文件,并让他们做培训的过程中,但我需要能够在我的应用程序中选择正确的配置文件。

I have found the Speech Recognition control panel in windows (Windows 7 in this case) where I can configure training profiles. Setting up a profile for myself and doing the training process significantly improved the accuracy of the recognition. So I could setup profiles for every user and have them do the training process, but then I need to be able to select the right profile in my application.

我的应用是一个服务器,其接收从一个或多个用户的音频流的时间和进行语音识别。所以,我需要能够指定以编程方式使用我的应用程序创建的识别引擎的每个实例,它识别配置文件。这不是一个单一的用户应用程序,所以我不能只让他们选择从Windows的控制面板他们的个人资料。

My application is a "server" that receives audio streams from one or more users at a time and performs the speech recognition. So I need to be able to specify which recognition profile to use programmatically for each instance of the recognition engine that my application creates. This is not a single user application, so I can't just have them select their profile from the Windows control panel.

推荐答案

我不明白的方式通过System.Speech.Recognition做到这一点,但你可以通过speechlib做它(SAPI IDispatch接口兼容的API)。看看 ISpeechRecognizer ::简介

I don't see a way to do it via System.Speech.Recognition, but you can do it via speechlib (the SAPI IDispatch-compatible API). Look at ISpeechRecognizer::Profile.

要设置的配置文件,您将需要添加

To set the profile, you will need to add

using SpeechLib;

到code,以及System.Speech.Recognition。

to your code, along with System.Speech.Recognition.

最棘手的部分会得到您通过SpeechLib设置为大棒要创建的System.Speech.Recognition.RecognitionEngine而轮廓。我可能会设置配置文件为默认值(通过SpeechLib),创建RecognitionEngine,并重新设置默认的配置文件。

The tricky part would be getting the profile that you set via SpeechLib to 'stick' while you're creating the System.Speech.Recognition.RecognitionEngine. I'd probably set the profile to be default (via SpeechLib), create the RecognitionEngine, and reset the default profile.

(我假设你不打算使用共享识别器,这将不会在多用户的情况下工作。)

(I'm assuming that you're not planning to use the shared recognizer, which won't work in a multiuser scenario.)

您可能会需要一个关键部分,以确保只有一个线程可以一次创建RecognitionEngine。

You'll probably need a critical section to make sure that only one thread can create the RecognitionEngine at a time.

这篇关于System.Speech.Recognition选择识别配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆