2 如何以相同的形式使用对数两次(sphinx4)
我已经使用 netbeans 配置了 sphinx,并且工作正常。但我使用一个按钮来完成这个过程。但在它的识别器之后。我想再做一次这个过程。但随后它给出一个错误,说“logmath 实例已经存在”并说无法打开麦克风。
有人可以给我一个解决方案吗?我想做的是以相同的形式多次使用语音识别。直到给出正确答案。
请帮助我,
这是我收到的错误
“正在创建 LogMath 的新实例,而另一个实例已存在” 10:53:27.833 严重麦克风无法打开格式为 PCM_SIGNED 16000.0 Hz、16 位、单声道、2 字节/帧、不支持大尾数法的麦克风线路。”
i have configured sphinx with netbeans and its wroking fine. but im using a button to do the process. but after it recognisers. i want to do the process again. but then it gives a error saying the "logmath instance is already present" and saying cannot open the microphone.
can someone give me a solution. what i want to do is use speech recogntion in several times in the same form. till it gives the correct answer.
please help me
this is the error i get
"Creating new instance of LogMath while another instance is already present
10:53:27.833 SEVERE microphone Can't open microphone line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian not supported."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每次完成语音识别时,您都会一次又一次地使用识别器。
you are using the Recognizer again and again each time you done the speech recognition.
确保“
//获取语音文本
结果 result = recognizer.recognize();
“
仅调用上述结果一次。如果您在同一事件中多次调用。它将给出错误。因此将其公开为仅调用一次并执行该过程。然后它应该可以工作
make sure to "
//Get the spoken text
Result result = recognizer.recognize();
"
call this above result only one time. if you call again and again in the same event. it will give a error. so make it public to call only once and do the process. then it should work