• Post Reply Bookmark Topic Watch Topic
  • New Topic

including jars in build path & speech synthesis  RSS feed

 
Max Benjamin
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that the two subjects in my heading probably seem a little unreleated but I wanted to fool around with FreeTTS http://freetts.sourceforge.net/docs/index.php#download_and_install

I'm new to Java and so I'm not sure how to include jars in my build path for complilation. I'm on OSX and using Bash and javac to compile.

Also can anyone recommend some speech synthesis libraries besides freeTTS?

Thanks,
Max
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know anything about speech synthesis.
Jars: this means java archive.
You can get a jar file set up automatically from your project if you use an IDE. Otherwise you can set up jars from the command prompt or shell windows. As for most things, there is a section in the Java tutorial about it. And here in the developers' website. Make sure you get the spelling in the manifest files absolutely right, and terminate the last line with a return or newline.

As for importing jars: It is easier in an IDE. In Eclipse, you right-click the name of the project->properties->build path->libraries->add external JARs.
There is a way you can include an extra classpath, but I can't remember how to do it. Try this javac documentation.

Sorry I can't be more helpful; anybody else remember the syntax for importing a jar?
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the javac documentation may help. Follow the link to javadoc, then the setting the classpath link, which brings you here.
It says,
C:> set CLASSPATH=classpath1;classpath2...

where:

sdkTool
A command-line tool, such as java, javac, javadoc, or apt. For a listing, see JDK Tools.

classpath1;classpath2
Class paths to the .jar, .zip or .class files. Each classpath should end with a filename or directory depending on what you are setting the class path to:

* For a .jar or .zip file that contains .class files, the class path ends with the name of the .zip or .jar file.
* For .class files in an unnamed package, the class path ends with the directory that contains the .class files.
* For .class files in a named package, the class path ends with the directory that contains the "root" package (the first package in the full package name).
I think that means you can write

set CLASSPATH=c:\JavaPrograms\speech\FreeTTS\freetts.jar;c:\otherFolder\otherFile.jar;.

The examples are given in Windows format; I am sure you can change it to OSX format.
 
Max Benjamin
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much. Very helpful.
Max
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope it works. Only too pleased to help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!