2 如何以相同的形式使用对数两次(sphinx4)

发布于 2024-08-30 19:21:05 字数 316 浏览 2 评论 0原文

我已经使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

送君千里 2024-09-06 19:21:05

每次完成语音识别时,您都会一次又一次地使用识别器。

you are using the Recognizer again and again each time you done the speech recognition.

风吹雪碎 2024-09-06 19:21:05

确保“
//获取语音文本
结果 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文