public class FreeTTSTime extends FreeTTS
Constructor and Description |
---|
FreeTTSTime()
Class constructor.
|
FreeTTSTime(Voice voice)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
private static void |
interactiveMode(FreeTTSTime freetts)
Starts interactive mode on the given FreeTTSTime.
|
static void |
main(String[] args)
The main entry point for FreeTTSTime.
|
void |
safeTimeToSpeech(String time)
Speaks the given time.
|
void |
speakNow()
Tells the current time.
|
private static String |
timeApprox(int hour,
int min)
Returns a phrase that conveys the exactness
of the time.
|
private static String |
timeHour(int hour,
int min)
Returns a phrase that conveys the hour in relation
to the hour.
|
private static String |
timeMin(int hour,
int min)
Returns a phrase that conveys the minutes in relation
to the hour.
|
private static String |
timeOfDay(int hour,
int min)
Returns a phrase that conveys the time of day.
|
void |
timeToSpeech(int hour,
int min)
Speaks the time given the hour and minute.
|
void |
timeToSpeech(String time)
Speaks the given time.
|
static String |
timeToString(int hour,
int min)
Returns a string that corresponds to the given time.
|
static String |
timeToString(String time)
Returns a string that corresponds to the given time.
|
static void |
usage()
Prints the usage message for FreeTTSTime.
|
fileToSpeech, getInputMode, getSilentMode, getVoice, setAudioFile, setInputMode, setMultiAudio, setSilentMode, setStreamingAudio, shutdown, startup, streamToSpeech, textToSpeech, urlToSpeech, usage
private static final String VERSION
public FreeTTSTime()
public FreeTTSTime(Voice voice)
voice
- Voice to say time withpublic static void usage()
private static void interactiveMode(FreeTTSTime freetts)
freetts
- the engine that speaksprivate static String timeApprox(int hour, int min)
hour
- the hour of the timemin
- the minute of the timeprivate static String timeMin(int hour, int min)
hour
- the hour of the timemin
- the minute of the timeprivate static String timeHour(int hour, int min)
hour
- the hour of the timemin
- the minute of the timeprivate static String timeOfDay(int hour, int min)
hour
- the hour of the timemin
- the minute of the timepublic static String timeToString(String time)
time
- the time in the form HH:MMpublic static String timeToString(int hour, int min)
hour
- the hourmin
- the minutespublic void timeToSpeech(String time)
time
- the time in the form HH:MMIllegalArgumentException
- if time is not in the form
HH:MMpublic void timeToSpeech(int hour, int min)
hour
- the hour of the day (0 to 23)min
- the minute of the hour (0 to 59)public void safeTimeToSpeech(String time)
time
- the time in the form HH:MMpublic void speakNow()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses