如何在机器讲话时阻止SpeechRecognition [英] How can I block SpeechRecognition while the machine is speaking

查看:108
本文介绍了如何在机器讲话时阻止SpeechRecognition的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

 我的程序使用 SpeechRecognition TTS
在一起,我想阻止SpeechRecognition ,而它正处于说话例程。

 My program uses SpeechRecognition and TTS together, and I want to block SpeechRecognition while it is in speaking routine.

我试图阻止Speaking部分,但它没有'工作。

I tried to block Speaking part, but it didn't work.

我认为即使节目正在讲话,KinectAudioStream也会将用户的语音存储在缓冲区中。

I think KinectAudioStream stores user's speech in the buffer even though program is speaking.

识别部分接收机器的声音,以便反映声音并且Kinect识别出来。

Recognition part receives Machine's voice, so that sound is reflected and Kinect recognize that.

我试图 stopCapture(), startCapture()例程,但它也不起作用,

I tried to stopCapture(), and startCapture() routine, but it didn't work also,

你能帮帮我吗?

推荐答案

你不应该停止/启动识别器相反,有一个关闭你的口译员的开关。换句话说,系统仍然会从输出的TTS中得到误报,但是你的代码不会对它做任何事情。
You shouldn't be stopping/starting the recognizer, instead, have a switch that turns off your interpreter. In other words, the system will still get the false positive from the outputted TTS, but your code won't do anything with it.


这篇关于如何在机器讲话时阻止SpeechRecognition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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