try using
import voce.*
If you look at http://voce.sourceforge.net/api/java/_speech_interface_8java-source.html
It mentions the package as (package voce).
Question
I have downloaded a voice/text API for java from http://voce.sourceforge.net/
However being semi new to java I am unsure how to use all these jar files in my code, have tried several things like import voce, import java.voce, package (my folder name with the voce jar inside).
However I am getting no luck.
Code I am trying is
import java.voce;
public class SpeechInterface
{
public static void main(String[] args){
voce.SpeechInterface.synthesize("hello world");
}
}
Error I get is that it cant find voce(since I am obviously doing this wrong). Have looked through stackoverflow but was unable to find a question that answers this. I imagine there is one like this already but I can not find it. Closest I could find was the importing voce to C, but that wasn't to helpful.
The jar file is in same directory as the java file.
Solution
try using
import voce.*
If you look at http://voce.sourceforge.net/api/java/_speech_interface_8java-source.html
It mentions the package as (package voce).
OTHER TIPS
Here under the Tab no 10. You can find how to add a Jar file to Dr.Java IDE,
Then as Kakarot Mention , you should to write
import.voce.*;
if you need all the classes of package voce, or write
import.voce.classname
to import a specific class.