更改语音识别引擎库的语言 [英] Change the language of Speech Recognition Engine library

查看:67
本文介绍了更改语音识别引擎库的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个程序(C#),以识别来自用户的语音命令并在PC中执行,即用户说开始菜单",然后PC打开开始菜单.

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

我找到了一个很酷的库: SpeechRecognitionEngine 对于语音识别,问题在于我也需要识别西班牙语,是否可以更改语言?

I have find a cool library: SpeechRecognitionEngine for the speech recognition, the problem is that I need to recognize spanish language too, is there any way to change the language?

推荐答案

您可以使用

这假定用户安装了西班牙语区域,否则将抛出 ArgumentException . SpeechRecognitionEngine 类实现了 IDisposable ,因此最好在完成后调用 speechRec.Dispose()或在 using 语句.

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

这篇关于更改语音识别引擎库的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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