EmSyLicious0103 Posted February 15, 2011 Share Posted February 15, 2011 I am making a java applet that will literally read (text-to-speech) the word passed by a Php page.. this is trial code in php (i made a simple one first to make it easier to look for the error) <? $readme="hello hello hello"; ?> <applet code="HelloWorld.class"> <param name="readme" value="<?php echo $readme; ?>" /> </applet> then this is the code form my java program.. public class HelloWorld extends Applet { public static void main(String args[]) throws NullPointerException { try { Synthesizer synth; synth = Central.createSynthesizer( new SynthesizerModeDesc(Locale.ENGLISH)); synth.allocate () ; synth.resume () ; String readme = this.getParameter("readme"); synth.speakPlainText ( readme, null ) ; synth.waitEngineState ( Synthesizer.QUEUE_EMPTY ) ; synth.deallocate(); } catch(Exception r) { r.printStackTrace(); } } } i tried running it on localhost and it does not produce an audio that is supposed to be the word passed from the php page.. PLS HELP :{ Link to comment https://forums.phpfreaks.com/topic/227698-java-applet-to-read-passed-variable-from-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.