• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Java speech & Java Telephony

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic