views:

612

answers:

2

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

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.

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.

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.

A: 

how about asking them each to say their name to prime it with a given user?

it's not a very secure method if you'd like this solution to have some amount of authentication... you could tell them to use a given phrase that the system will recognize as a 'certain user' that can't really be faked?

this is pretty interesting though, I gotta say.

Oren Mazor
Thanks Oren. I actually have a way to identify which user is connecting to the server. What I am trying to find is, given that I know which user is connected, how can I specify to the recognition engine that it should be using a specific preconfigured training profile, so that it will accuratly recognize the words that the user spoke. It seems this can be done through the C++ API, but I am hoping someone knows how to do it through the .NET/C# API.
Mark Kanof
+2  A: 

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;

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

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.)

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

Eric Brown