Dear All,

I'm developing a small Java application which will use Espeak to speak certain text. Now I pass the test as command line argument

$espeak -s 50 "a for apple"

It works perfect on command line
Now in my program, I've used

String cmd = "espeak -s 50 \"A for apple\"";

Then I use this string as
Process p = Runtime.getRuntime().exec(cmd);

Instead of playing 'A for apple' this plays onle 'A', I've tried with \\ but it says
a backslash. So what we need to include is a way to let espeak know of space and remaining string. Please help me about how to do this.

Thanks in Advance.

Vaibhav Dalvi

Have you tried escaping spaces using a singular?

String cmd = "espeak -s 50 \"A\ for\ apple\"";

I would think that using \\ would print a literal \.

Have you tried escaping spaces using a singular?

String cmd = "espeak -s 50 \"A\ for\ apple\"";

I would think that using \\ would print a literal \.

Hi,
Thanks for the reply, but I've already done that.

The espeak speaks the string as "a backslash" and that's it. No more reading.
Anyway I've dumped espeak and just half an hour ago got festival working perfect. So i'm using files for the stuff and i'm doing fine (atleast for now)

Thanks again.
Regards,
Vaibhav

salut,
est ce que je peut appelé espeak sous programme perl??
si oui , SVP dit moi comment?

merci d'avance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.