5 Replies Latest reply on Feb 24, 2011 10:59 AM by PhHein

    how to use mbrola with java?

      hi all

      ive develope a simple text to phone engine.
      i didnt use any jsapi tho.

      can i still use mbrola for synthesizing the speech?
      may i know how?

      thank youuuuu....
        • 1. Re: how to use mbrola with java?
          Check out


          • 2. Re: how to use mbrola with java?
            Add these to your classpaths. then compile the code below!!!!


            I have not tested them but one by one but
            These jar's are all requried to compile the FreeTTS File.
            The jars are available in the FreeTTS download page in the FreeTTs Bin Zip File at

            System Classpath + User Classpath

            C:\Program Files\Java\jdk1.5.0_06\lib\jsapi.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\cmulex.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\mbrola.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\freetts.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\en_us.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\cmutimelex.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\cmudict04.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\cmu_time_awb.jar;
            C:\Program Files\Java\jdk1.5.0_06\lib\cmu_us_kal.jar;

            User Path
            C:\Program Files\Java\jdk1.5.0_06\lib

             * Copyright 2003 Sun Microsystems, Inc.
             * See the file "license.terms" for information on usage and
             * redistribution of this file, and for a DISCLAIMER OF ALL
             * WARRANTIES.
            import com.sun.speech.freetts.Voice;
            import com.sun.speech.freetts.VoiceManager;
            import com.sun.speech.freetts.audio.JavaClipAudioPlayer;
             * Simple program to demonstrate the use of the FreeTTS speech
             * synthesizer.  This simple program shows how to use FreeTTS
             * without requiring the Java Speech API (JSAPI).
            public class FreeTTS
            VoiceManager voiceManager;
            Voice voice;
                  public  FreeTTS() {
                      public void TTS(String words)
                      String voiceName = "mbrola_us3";
                      //String voiceName = "kevin16";
                  //  System.out.println();
                 //   System.out.println("Using voice: " + voiceName);
                    // The VoiceManager manages all the voices for FreeTTS.
                    voiceManager = VoiceManager.getInstance();
                    voice = voiceManager.getVoice(voiceName);
                  /*  Voice[] voices = voiceManager.getVoices();
                              for (int i = 0; i < voices.length; i++) {
                              System.out.println("    " + voices.getName()
                      + " (" + voices[i].getDomain() + " domain)");

            if (helloVoice == null)
            "Cannot find a voice named "
            + voiceName + ". Please specify a different voice.");

            // Allocates the resources for the voice.

            //Synthesize speech.

            // Clean up and leave.
            // System.exit(0);


            • 3. Re: how to use mbrola with java?
              Everytime I try to use MBROLA voices in Java programs such as mbrola_us1, I get following messages:
              Processing Utterance: com.sun.speech.freetts.ProcessException: Cannot start mbrola program: [Ljava.lang.String;@f3d6a5
              Processing Utterance: com.sun.speech.freetts.ProcessException: Cannot start mbrola program: [Ljava.lang.String;@f3d6a5

              I could never figure out what I did wrong because I downloaded and installed the mbrola binary and voices data files according to the instructions. I would greatly appreciate if someone can tell me what I might be missing. My email is ylees@gmu.edu. Thank you.
              • 4. Re: how to use mbrola with java?
                I am also getting the same problem. So any one please help me too. You will be doing a big help for me if u do this favor for me. My id is harika.garapati.cse@gmail.com
                • 5. Re: how to use mbrola with java?
                  Welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.

                  I'm locking this thread now.