无法初始化麦克风。语音识别已禁用

时间:2014-12-28 08:31:33

标签: java voice-recognition microphone

我正在使用Java上的Voce API尝试非常基本的东西:

public class Vocetest {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    SpeechInterface.init("C:\\Users\\Ahmed Akabawi\\Desktop\\voce-0.9.1\\lib",true,true,"C:\\Users\\Ahmed Akabawi\\Documents\\NetBeansProjects\\Vocetest\\vocabulary.txt",""); 

  SpeechInterface.setRecognizerEnabled(true);
 while (SpeechInterface.getRecognizerQueueSize() > 0)
    {
         SpeechInterface.setRecognizerEnabled(true);
  String s = voce.SpeechInterface.popRecognizedString();
  System.out.println("You said: " + s);
    }
}

我得到的是

[Voce] Initializing synthesizer
[Voce] Initializing recognizer. This may take some time...
[Voce] No grammar file specified.  Defaulting to 'digits.gram'
[Voce] Initialization complete
[Voce warning] Cannot initialize microphone. Speech recognition disabled.

麦克风无法初始化。但是我测试了它,它正在工作。

我该怎么办?

0 个答案:

没有答案