|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpgbennett.speech.Speaker
public class Speaker
Implements a text to speech interface
| Constructor Summary | |
|---|---|
Speaker()
Creates a Speaker object that outputs to a sound card, on Windows systems only. |
|
Speaker(java.lang.String fileName)
Creates a Speaker object that outputs to a wave file. |
|
| Method Summary | |
|---|---|
boolean |
close()
Close file or sound output device |
protected void |
finalize()
|
java.lang.String[] |
getVoiceList()
|
static java.lang.String[] |
getVoices()
|
boolean |
init()
|
static void |
main(java.lang.String[] args)
main method runs a test of all functions |
boolean |
setRate(int rate)
Sets the rate (speed) of output speech |
void |
setVoice(java.lang.String voiceName)
|
boolean |
setVolume(int volume)
Set output volume for text, default is 100 |
boolean |
speak(java.lang.String strInput)
Converts the given input text to speech. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Speaker()
throws javax.sound.sampled.UnsupportedAudioFileException
javax.sound.sampled.UnsupportedAudioFileException
public Speaker(java.lang.String fileName)
throws javax.sound.sampled.UnsupportedAudioFileException
fileName - File name for output wave file.
javax.sound.sampled.UnsupportedAudioFileException| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic boolean init()
init in interface SpeechInterfacepublic boolean speak(java.lang.String strInput)
speak in interface SpeechInterfacestrInput - String with words to convert to speechpublic boolean setRate(int rate)
setRate in interface SpeechInterfacerate - Rate, valid values are from -10 to 10public boolean setVolume(int volume)
setVolume in interface SpeechInterfacevolume - Volume from 0 to 100public boolean close()
close in interface SpeechInterfaceprotected void finalize()
finalize in class java.lang.Objectpublic void setVoice(java.lang.String voiceName)
setVoice in interface SpeechInterfacepublic static java.lang.String[] getVoices()
public java.lang.String[] getVoiceList()
getVoiceList in interface SpeechInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||