Hello. This might be easy for someone but I have dealt with several errors today and this being the last error that i just could not figure out. I am a newbie so pardon me if i am clueless...within my eclipse ide i am getting this error:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at edu.cmu.sphinx.demo.robottest.RobotTest.main(Robot Test.java:19)
When i lookup like 19 (which I have tried to make changes to so its not the way it was yet there is still an error):
package edu.cmu.sphinx.demo.robottest; import edu.cmu.sphinx.frontend.util.Microphone; import edu.cmu.sphinx.recognizer.Recognizer; import edu.cmu.sphinx.result.Result; import edu.cmu.sphinx.util.props.ConfigurationManager; public class RobotTest { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub ConfigurationManager cm; if (args.length > 0) { cm = new ConfigurationManager(args[0]); } else { cm = new ConfigurationManager(RobotTest.class.getResource("robottest.config.xml")); } Recognizer recognizer = (Recognizer) cm.lookup("recognizer"); recognizer.allocate(); // start the microphone or exit if the programm if this is not possible Microphone microphone = (Microphone) cm.lookup("microphone"); if (!microphone.startRecording()) { System.out.println("Cannot start microphone."); recognizer.deallocate(); System.exit(1); } System.out.println("Say: anything from the RobotTest.gram"); // loop the recognition until the programm exits. while (true) { System.out.println("Start speaking. Press Ctrl-C to quit.\n"); Result result = recognizer.recognize(); if (result != null) { String resultText = result.getBestFinalResultNoFiller(); System.out.println("You said: " + resultText + '\n'); } else { System.out.println("I can't hear what you said.\n"); } } } }
I will appreciate any help!