简体   繁体   English

C#语音识别:动态读取输入

[英]C# Speech Recognition: Dynamically Reading Input

As part of an AI program that I'm writing, I would like to know if it is possible to print to the screen what the the default Windows SpeechRecognitionEngine is hearing. 作为我正在编写的AI程序的一部分,我想知道是否可以在屏幕上打印默认的Windows SpeechRecognitionEngine正在听到什么。 It's hard to explain, but I have a text box that's locked in my window, and as the engine is listening to what you're saying, I'd like the textbox to display what it's hearing/what words it's picked up, and I'd like it to do this AS it's hearing you. 很难解释,但是我的窗口中锁定了一个文本框,并且当引擎正在听您说的话时,我希望该文本框显示它所听到的内容/拾取的单词,然后我很想这样做,因为它正在听到您的声音。 Afterwards, if it's heard you say a command that it recognizes, it will display the command in the textbox (this part has successfully been incorporated), and if it doesn't know what you said (if it wasn't a command), I'd like it to display what you said in red text. 之后,如果听到您说出可以识别的命令,它将在文本框中显示该命令(该部分已成功合并),并且如果它不知道您说的内容(如果不是命令),我希望它以红色文字显示您的发言。

If anybody knows how to dynamically get the speech recognition engine's 'thoughts' as it's listening, in C# of course, please do let me know how I can use this. 如果有人知道如何动态地获取语音识别引擎的“想法”,请使用C#,当然,请告诉我如何使用它。

I hope I've explained what it is I'm trying to achieve, and I hope you understand. 我希望我已经解释了我要实现的目标,希望您能理解。

Thank you for your time. 感谢您的时间。

您可以“收听” SpeechHypothesized事件,该事件用于调试并包含多个RecognitionResult (部分识别的单词,替代项等)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM