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
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.