import javax.speech.synthesis.*;
public class TrySpeech {
public static void main(String args[]) {
Synthesizer synthesizer = Central.createSynthesizer(null);
synthesizer.allocate();
try {
synthesizer.speak("Hello I am a computer", null);
synthesizer.speak(
"Hello I am a <EMP>computer</EMP>", null);
synthesizer.speak(
"Hello I am a <PROS PITCH="+10%">computer</PROS>",
null);
} catch (Exception e) { e.printStackTrace(); }
}
}