import java.util.Scanner;
import com.sun.speech.freetts.VoiceManager;
import com.sun.speech.freetts.Voice;
public class TextToSpeech {
public static void main(String args[]){
Scanner input = new Scanner(System.in);
String userInput = input.nextLine();
if(userInput == "hi"){
Voice v;
VoiceManager vm=VoiceManager.getInstance();
v=vm.getVoice("kutlo1");
v.allocate();
v.speak("Hey my name is kutlo");
input.close();
}else
System.out.println("you suck try again");
}
}
sekwamote
0
Newbie Poster
Recommended Answers
Jump to Postso learn to use BlueJ, or better yet learn Java and ditch that POS excuse for an IDE.
You might want to pick up a better IDE at some point, but learn to use that.
Your "problem" has nothing to do with Java, and everything with you not reading the …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.