My Opera is closing 3rd of March

Infinity

Love

Subscribe to RSS feed

Jva Speech Recognition API

import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.*;

public class TellTime {

public static void main(String[] args) {
try {
Calendar calendar = new GregorianCalendar();
String sayTime = "Its " +
calendar.get(Calendar.HOUR) + " " +
calendar.get(Calendar.MINUTE) + " " +
(calendar.get(Calendar.AM_PM)== 0 ? "AM" : "PM");

Synthesizer synth = Central.createSynthesizer(null);
synth.allocate();
synth.resume();

synth.speakPlainText(sayTime,null);

synth.waitEngineState(Synthesizer.QUEUE_EMPTY);
synth.deallocate();

} catch (Exception e) {
e.printStackTrace();
}
}
}
February 2014
M T W T F S S
January 2014March 2014
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28