Results 1 to 7 of 7
  1. #1
    soyio is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default Problem with FreeTTS.

    Hi there.
    i m running a sample project on netbeans and i m using freetts to output some voice.
    While running it inside netbeans it works fine..
    When i try to run it from the dist folder that netbeans create, i get this error...

    Java Code:
    Using voice: kevin16
    testing 1
    java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:127)
        at java.util.jar.JarFile.<init>(JarFile.java:135)
        at java.util.jar.JarFile.<init>(JarFile.java:72)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:55)
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
        at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
        at java.net.JarURLConnection.getManifest(JarURLConnection.java:217)
        at java.net.JarURLConnection.getMainAttributes(JarURLConnection.java:269)
        at com.sun.speech.freetts.VoiceManager.getDependencyURLs(VoiceManager.java:251)
        at com.sun.speech.freetts.VoiceManager.getDependencyURLs(VoiceManager.java:283)
        at com.sun.speech.freetts.VoiceManager.getVoiceDirectories(VoiceManager.java:173)
        at com.sun.speech.freetts.VoiceManager.getVoices(VoiceManager.java:110)
        at com.sun.speech.freetts.VoiceManager.getVoice(VoiceManager.java:502)
        at javaapplication11.JavaApplication11.main(JavaApplication11.java:22)
    System property "mbrola.base" is undefined.  Will not use MBROLA voices.
    testing 2
    Cannot find a voice named kevin16.  Please specify a different voice.
    here is the code where the error is coming from (particularly between the testing1-testing2 print statements)

    Java Code:
    package javaapplication11;
    import com.sun.speech.freetts.Voice;
    import com.sun.speech.freetts.VoiceManager;
    
    public class JavaApplication11 {
    
        public static void main(String[] args) {
            // TODO code application logic here
          String voiceName = (args.length > 0)
                ? args[0]
                : "kevin16";
            System.out.println();
            System.out.println("Using voice: " + voiceName);
            /* The VoiceManager manages all the voices for FreeTTS.
             */
            VoiceManager voiceManager = VoiceManager.getInstance();
    
            System.out.println("testing 1");
            Voice helloVoice = voiceManager.getVoice(voiceName);
            System.out.println("testing 2");
    
            if (helloVoice == null) {
                System.err.println(
                    "Cannot find a voice named "
                    + voiceName + ".  Please specify a different voice.");
            }
            else{
            helloVoice.allocate();
            /* Synthesize speech.
             */
            helloVoice.speak("Thank you for giving me a voice. "
                             + "I'm so glad to say hello to this world.");
            /* Clean up and leave.
             */
            helloVoice.deallocate();
            }
        }
    }
    Any ideas why this is happening? i tried a lot to find why but didn't make it...
    Thank you

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    Where does kevin16 come from?
    It looks like it's having problems finding that resource?

  3. #3
    soyio is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default

    kevin16 is supposed to be one of the default voices of freetts and i guess it is included in the freetts.jar... i didn't do any modifications to kevin16 and it is running in netbeans..

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    That is odd.
    We've had people asking about running freetts here before, and they do get it working.
    At least I'm pretty sure it was that one...
    If JosAH wanders in here he might be able to help, as I seem to remember he's done some playing around with the voice stuff.

  5. #5
    soyio is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default

    i ll try to check any of the other samples... i dont understand why it s not working though..

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    It'll be some file missing from the dist that is accessible to Netbeans for some reason.
    That's usually the case with these things.
    Not knowing how this works I really couldn't say what is missing.

  7. #7
    aubreybourke is offline Member
    Join Date
    Feb 2012
    Location
    Dublin
    Posts
    29
    Rep Power
    0

    Default Re: Problem with FreeTTS.

    You get the missing voice "kevin16" when you compile your program and package it in a jar without putting the voices.txt file in the default directory. If your using a text editor and have unpacked the freetts.jar into that default directory with your source code and other stuff. Then the voices.txt file would read:

    # This file lists the voice directories avialable to FreeTTs.
    # To get the name of a voice directory from a voice jar file,
    # type "java -jar voicefile.jar".
    #
    # Entries should look like:
    #com.sun.speech.freetts.en.us.cmu_time_awb.AlanVoi ceDirectory
    #com.sun.speech.freetts.en.us.cmu_us_kal.KevinVoic eDirectory

    com.sun.speech.freetts.en.us.cmu_time_awb.AlanVoic eDirectory
    com.sun.speech.freetts.en.us.cmu_us_kal.KevinVoice Directory

    # Uncomment to allow MBROLA voices:
    #de.dfki.lt.freetts.en.us.MbrolaVoiceDirectory

    A program such as netbeans or eclipse would compile the jar file with this file as a parameter.

Similar Threads

  1. text to speech conversioin using freeTTs
    By yonas in forum New To Java
    Replies: 3
    Last Post: 05-24-2011, 04:58 PM
  2. FreeTTS MBROLA problem
    By Fillis52 in forum New To Java
    Replies: 1
    Last Post: 01-16-2011, 04:48 AM
  3. Problem using FreeTTs
    By arshadalisoomro in forum Advanced Java
    Replies: 0
    Last Post: 01-12-2011, 08:04 PM
  4. FreeTTS / speech.. only rendering Numbers??
    By SM2010 in forum New To Java
    Replies: 8
    Last Post: 09-23-2010, 02:55 PM
  5. how to play text using freetts
    By kattavijay in forum Java Servlet
    Replies: 1
    Last Post: 03-19-2009, 08:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •