ciao, qualcuno di voi ha mai usato javax.speech per il riconoscimento e la sintesi vocale?
ho trovato molto poco sul web, ho usato questo codice ma mi da errore:

import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.Locale;

public class Prova
{

public static void main(String args[])
{
try
{
// Create a synthesizer for English
Synthesizer synth = Central.createSynthesizer(new SynthesizerModeDesc(Locale.ENGLISH));
synth.allocate(); //QUI MI DA ERRORE, NULLPOINTEREXCEPTION
synth.resume();

// Speak the "Hello, Unleashed Reader" string
synth.speakPlainText("Hello, Unleashed Reader!", null);
System.out.println(
"You should be hearing Hello, Unleashed Reader now");

// Wait till speaking is done
synth.waitEngineState(Synthesizer.QUEUE_EMPTY);

// release the resources
synth.deallocate();
} catch (Exception e)
{
e.printStackTrace();
}
}
}

ho trovato questo codice sul web, se qualcuno l'ha usato e funziona potrebbe postarmi il codice di un demo funzionante?e magari un pò di materiale!grazieeeee