Sending input to stdin and getting the full output in Java - Festival TTS

view story

http://stackoverflow.com – I'm trying to use the Java Runtime.getRuntime().exec(String) command to run Festival, then use OutputStreamWriter to write some commands to the outpustream of the process. This works great, and I'm able to do something like this: Process p = Runtime.getRuntime().exec("festival"); Writer w = new OutputStreamWriter(p.getOutputStream()); w.append("(SayText \"Hello World\")"); w.flush(); Obviously the way I can tell this works is that it speaks the text through the speakers. What I am having a real hard time doing is getting the text output from what I would see in the terminal. I'm trying to (HowTos)