0 Replies Latest reply on Jun 18, 2009 2:20 PM by 843802

    Runtime error with my voice synthesizer code Help!!

      I am using freeTTS. Based off of looking at the API, I tried to develop this simple code:

      import com.sun.speech.engine.*;
      import com.sun.speech.freetts.*;
      import com.sun.speech.freetts.lexicon.*;
      import com.sun.speech.freetts.en.us.*;
      import com.sun.speech.freetts.audio.*;
      public class SpeakEng
      public static void main(String args[])
      Voice voice = new CMUDiphoneVoice();
      CMULexicon Hi = new CMULexicon();
      voice.setLexicon((Lexicon)Hi); //typecast just in case, the runtime error doesn't change
      voice.setAudioPlayer(new JavaClipAudioPlayer());

      Through moving all the imported class files above into the CLASSPATH, I was able to compile this program. However now I am encountering the following runtime error:
      Exception in thread "main":
      java.lang.ClassNotFoundException: com.sun.speech.freetts.lexicon.Lexicon

      followed by a list of locations. Has anyone faced this similar problem, and if so could you offer any pointers?