Change the language of the Engine Recognition Engine library

I am working on a program (in C #) to recognize voice commands from a user and execute on a PC, that is, the user says "Start" menu, and the PC opens the "Start" menu.

I have a cool library: SpeechRecognitionEngine for speech recognition, the problem is that I need to also recognize Spanish, is there a way to change the language?

+4
source share
1 answer

You can use SpeechRecognitionEngine (CultureInfo) overload.

var speechRec = new SpeechRecognitionEngine(new CultureInfo("es-ES"))); 

This assumes that the user has set up a Spanish culture, otherwise an ArgumentException will be thrown. The SpeechRecognitionEngine class implements IDisposable , so it is recommended that you call speechRec.Dispose() when you're done, or use it in a using statement.

+8
source

All Articles