• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Speech NullPointers

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Im trying to get a sample piece of code up and running using the Java Speech API, I have tried many different tutorials, all are the same basic contents... in the Main method, a synthesizer is created and allocated...
Synthesizer synth = Central.createSynthesizer(
new SynthesizerModeDesc(Locale.ENGLISH));
synth.allocate();
synth.resume();

Than when the speech is done, it is deallocated()

My code compiles fine, but when I try to run it, it has problems with the allocation and deallocation, it gives me a NullPointerException.

I have looked at many different tutorials, they all compile fine, and then when I run them I get the same error.
How can I make it work?!!
Any thoughts?
Im really stuck on this.....
Thanks,
O(n).
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A NullPointerException is a RuntimeException, meaning the compiler won't find it for you. Somewhere in your code, and the examples, it is trying to use a null object, hence the exception. Other than that, I am sorry to say that I cannot help much because I am not familiar with JavaSpeech.
 
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic