Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法初始化麦克风。禁用语音识别_Java_Voice Recognition_Microphone - Fatal编程技术网

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

Java 无法初始化麦克风。禁用语音识别,java,voice-recognition,microphone,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\\Ahme

我在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.
麦克风无法初始化。然而,我已经测试了它,它正在工作

我该怎么办