我正在使用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.
麦克风无法初始化。但是我测试了它,它正在工作。
我该怎么办?