Package com.sun.speech.freetts
Class FreeTTS
java.lang.Object
com.sun.speech.freetts.FreeTTS
- Direct Known Subclasses:
FreeTTSTime
Standalone utility that directly interacts with a CMUDiphoneVoice.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfileToSpeech(String filePath) Converts the text contained in the given path to speech.Returns the InputMode.booleanGets silent mode.protected VoicegetVoice()Returns the voice used by FreeTTS.static voidThe main entry point for FreeTTS.voidsetAudioFile(String audioFile) Sets the audio file .voidsetInputMode(InputMode inputMode) Sets the input mode.voidsetMultiAudio(boolean multiAudio) Sets multi audio.voidsetSilentMode(boolean silent) Turns audio playing on and off.voidsetStreamingAudio(boolean streamingAudio) Sets streaming audio.voidshutdown()Shuts down this FreeTTS synthesizer by closing the AudioPlayer and voice.voidstartup()Starts this FreeTTS Synthesizer by loading the void and creating a new AudioPlayer.booleanConverts the text contained in the given stream to speech.booleantextToSpeech(String text) Converts the given text to speech based using processing options currently set in FreeTTS.booleanurlToSpeech(String urlPath) Converts the text contained in the given path to speech.
-
Field Details
-
VERSION
Version number.- See Also:
-
-
Constructor Details
-
FreeTTS
public FreeTTS()Constructs a default FreeTTS with the kevin16 voice. -
FreeTTS
Creates a FreeTTS object with the given Voice.- Parameters:
voice- the voice to use
-
-
Method Details
-
startup
public void startup()Starts this FreeTTS Synthesizer by loading the void and creating a new AudioPlayer. -
shutdown
public void shutdown()Shuts down this FreeTTS synthesizer by closing the AudioPlayer and voice. -
textToSpeech
Converts the given text to speech based using processing options currently set in FreeTTS.- Parameters:
text- the text to speak- Returns:
- true if the utterance was played properly
-
getVoice
Returns the voice used by FreeTTS.- Returns:
- the voice used by freetts
-
streamToSpeech
Converts the text contained in the given stream to speech.- Parameters:
is- the stream containing the text to speak
-
urlToSpeech
Converts the text contained in the given path to speech.- Parameters:
urlPath- the file containing the text to speak- Returns:
- true if the utterance was played properly
-
fileToSpeech
Converts the text contained in the given path to speech.- Parameters:
filePath- the file containing the text to speak- Returns:
- true if the utterance was played properly
-
setSilentMode
public void setSilentMode(boolean silent) Turns audio playing on and off.- Parameters:
silent- if true, don't play audio
-
getSilentMode
public boolean getSilentMode()Gets silent mode.- Returns:
- true if in silent mode
- See Also:
-
setInputMode
Sets the input mode.- Parameters:
inputMode- the input mode
-
getInputMode
Returns the InputMode.- Returns:
- the input mode
- See Also:
-
setAudioFile
Sets the audio file .- Parameters:
audioFile- the audioFile
-
setMultiAudio
public void setMultiAudio(boolean multiAudio) Sets multi audio. If true, and an audio file has been set output will be sent to multiple files- Parameters:
multiAudio- iftruesend output to multiple files.
-
setStreamingAudio
public void setStreamingAudio(boolean streamingAudio) Sets streaming audio. If true, output will be sent to- Parameters:
streamingAudio- iftruestream audio
-
main
The main entry point for FreeTTS.
-