gpt4 book ai didi

java - Sphinx LineUnavailableException

转载 作者:行者123 更新时间:2023-11-29 09:28:48 24 4
gpt4 key购买 nike

需要有关如何正确使用 Sphinx4 API 的帮助,我从这个链接阅读:http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4,but当我运行 DialogDemo.java 时出现此错误:

Exception in thread "main" java.lang.IllegalStateException: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.
at edu.cmu.sphinx.api.Microphone.<init>(Microphone.java:38)
at edu.cmu.sphinx.api.SpeechSourceProvider.getMicrophone(SpeechSourceProvider.java:18)
at edu.cmu.sphinx.api.LiveSpeechRecognizer.<init>(LiveSpeechRecognizer.java:35)
at com.mycompany.spechrecognizer.DialogDemo.main(DialogDemo.java:143)
Caused by: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.
at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:513)
at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:124)
at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:416)
at edu.cmu.sphinx.api.Microphone.<init>(Microphone.java:36)

我在谷歌中搜索了如何修复它以及结果: Can't access microphone while running Dialog demo in sphinx4 5prealphahttps://github.com/cmusphinx/sphinx4/issues/33但我不明白,有人可以向我解释如何正确地逐步使用 sphinx API 吗?

最佳答案

是的,示例 DialogDemo.java 存在问题。但其他样本工作正常。

关于java - Sphinx LineUnavailableException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33047329/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com