我正在使用Sphinx的hello world jar文件并包含了Sphinx4.jar和WSJ ... 6800Hz.jar ...

代码如下所示:

object App {
  def main(args: Array[String]): Unit = {
    edu.cmu.sphinx.demo.helloworld.HelloWorld.main(Array[String]())
  }
}

但是我收到了错误:

SEVERE: couldn't find suitable target audio format
[error] (run-main-1) java.lang.IllegalArgumentException: No line matching interface TargetDataLine is supported.
java.lang.IllegalArgumentException: No line matching interface TargetDataLine is supported.
    at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:479)
    at edu.cmu.sphinx.frontend.util.Microphone.getAudioLine(Microphone.java:330)
    at edu.cmu.sphinx.frontend.util.Microphone.open(Microphone.java:359)
    at edu.cmu.sphinx.frontend.util.Microphone.startRecording(Microphone.java:435)
    at edu.cmu.sphinx.demo.helloworld.HelloWorld.main(HelloWorld.java:41)
    at example.App$.main(App.scala:10)
    at example.App.main(App.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
[trace] Stack trace suppressed: run last compile:run for the full output.
java.lang.RuntimeException: Nonzero exit code: 1
    at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last compile:run for the full output.
[error] (compile:run) Nonzero exit code: 1
[error] Total time: 6 s, completed Aug 29, 2014 11:06:43 PM
5. Waiting for source changes... (press enter to interrupt)

我在这里做错了什么?

  • Mac OS 10.9.4(macbook pro)

  • javac 1.8.0_11

  • Java(TM)SE运行时环境(版本1.8.0_11-b12)

  • Java HotSpot(TM)64位服务器VM(内置25.11-b03,混合模式)