I have been working on a speech synthesis program using JSAPI and FreeTTS.
I now have the code with NO errors (!!!:))

However, when I run the code, it doesn't actually have any audio to it.
If I change the text spoken to "This is text that is spoken." then it
says "This is (then is sounds like) 'STOP'" really, really quickly.

It also shows a few errors when I change the text.

The error I've come across is:

ClusterUnitDatabase: can't find tree for pau_z
ClusterUnitDatabase Error: getUnitIndex: can't find unit type pau_z

This appears to mean, to me, that a few of the sound 'specifiers' (for
lack of a better word) are not imported. However, I've imported all of the
files I know of that I have.

I'm not sure where the problem is, and I would be grateful for any help and/or
advise any one can give me on this.

Here is the code:

package helloworldsynthesis;

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

public class Main {
    public static void main(String args[]) {
	try {
             // Create a synthesizer for English
            Synthesizer synth = Central.createSynthesizer(new SynthesizerModeDesc(Locale.ENGLISH));

            // Get it ready to speak

            // Speak the "Hello world" string
            synth.speakPlainText("Hello World!", null);

            // Wait till speaking is done

            // Clean up
            } catch (Exception e) {

Thanks in advance,



Any help would be very helpful!


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.