hi all,
i am trying to run HelloSpeech progarm to
test but i am not able to execute it. i have downloaded the JSpeechLib_3_0 file & setted the classpath for all the jar file present in lib directory.while compiling no problem, but when i am executing it giving the error like below
java.lang.NullPointerException
at HelloSpeech.main(HelloSpeech.java:14)
here is the actual code:
import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.Locale;
public class HelloSpeech
{
public static void main(
String args[]) {
try {
// Create a synthesizer for English
Synthesizer synth = Central.createSynthesizer(new SynthesizerModeDesc(Locale.ENGLISH));
// Get it ready to speak
synth.allocate();
synth.resume();
// Speak the "" string
synth.speakPlainText("Hello, JUG heads!", null);
// Wait till speaking is done
synth.waitEngineState(Synthesizer.QUEUE_EMPTY);
// Clean up
synth.deallocate();
} catch (Exception e) {
e.printStackTrace();
}
}
}
now i am not to able undestand what to do next,why this error is comming. is there any thing more required to run this program. please any one tell me what is the procedure & requirement to run speech program and also what are necessary steps.