}
recognizer.stopRecognition();
}
public static void main(String[] args) throws Exception {
Configuration configuration = new Configuration();
configuration.setAcousticModelPath(ACOUSTIC_MODEL);
configuration.setDictionaryPath(DICTIONARY_PATH);
configuration.setGrammarPath(GRAMMAR_PATH);
configuration.setUseGrammar(true);
configuration.setGrammarName("dialog");
LiveSpeechRecognizer jsgfRecognizer =
new LiveSpeechRecognizer(configuration);
configuration.setGrammarName("digits.grxml");
LiveSpeechRecognizer grxmlRecognizer =
new LiveSpeechRecognizer(configuration);
configuration.setUseGrammar(false);
configuration.setLanguageModelPath(LANGUAGE_MODEL);
LiveSpeechRecognizer lmRecognizer =
new LiveSpeechRecognizer(configuration);
jsgfRecognizer.startRecognition(true);
while (true) {