• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

including jars in build path & speech synthesis

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 79707
381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79707
381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks so much. Very helpful.
Max
 
Campbell Ritchie
Marshal
Posts: 79707
381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope it works. Only too pleased to help.
 
Their achilles heel is the noogie! Give them noogies tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic