com.sun.speech.freetts
Class FreeTTS

java.lang.Object
  extended bycom.sun.speech.freetts.FreeTTS
Direct Known Subclasses:
FreeTTSTime

public class FreeTTS
extends java.lang.Object

Standalone utility that directly interacts with a CMUDiphoneVoice.


Constructor Summary
FreeTTS()
          Constructs a default FreeTTS with the kevin16 voice.
FreeTTS(Voice voice)
          Creates a FreeTTS object with the given Voice.
 
Method Summary
 boolean fileToSpeech(java.lang.String filePath)
          Converts the text contained in the given path to speech.
 InputMode getInputMode()
          Returns the InputMode.
 boolean getSilentMode()
          Gets silent mode.
protected  Voice getVoice()
          Returns the voice used by FreeTTS.
static void main(java.lang.String[] args)
          The main entry point for FreeTTS.
 void setAudioFile(java.lang.String audioFile)
          Sets the audio file .
 void setInputMode(InputMode inputMode)
          Sets the input mode.
 void setMultiAudio(boolean multiAudio)
          Sets multi audio.
 void setSilentMode(boolean silent)
          Turns audio playing on and off.
 void setStreamingAudio(boolean streamingAudio)
          Sets streaming audio.
 void shutdown()
          Shuts down this FreeTTS synthesizer by closing the AudioPlayer and voice.
 void startup()
          Starts this FreeTTS Synthesizer by loading the void and creating a new AudioPlayer.
 boolean streamToSpeech(java.io.InputStream is)
          Converts the text contained in the given stream to speech.
 boolean textToSpeech(java.lang.String text)
          Converts the given text to speech based using processing options currently set in FreeTTS.
 boolean urlToSpeech(java.lang.String urlPath)
          Converts the text contained in the given path to speech.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeTTS

public FreeTTS()
Constructs a default FreeTTS with the kevin16 voice.


FreeTTS

public FreeTTS(Voice voice)
Creates a FreeTTS object with the given Voice.

Parameters:
voice - the voice to use
Method Detail

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

public boolean textToSpeech(java.lang.String text)
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

protected Voice getVoice()
Returns the voice used by FreeTTS.

Returns:
the voice used by freetts

streamToSpeech

public boolean streamToSpeech(java.io.InputStream is)
Converts the text contained in the given stream to speech.

Parameters:
is - the stream containing the text to speak

urlToSpeech

public boolean urlToSpeech(java.lang.String urlPath)
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

public boolean fileToSpeech(java.lang.String filePath)
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:
setSilentMode(boolean)

setInputMode

public void setInputMode(InputMode inputMode)
Sets the input mode.

Parameters:
inputMode - the input mode

getInputMode

public InputMode getInputMode()
Returns the InputMode.

Returns:
the input mode
See Also:
setInputMode(com.sun.speech.freetts.InputMode)

setAudioFile

public void setAudioFile(java.lang.String audioFile)
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 - if true send output to multiple files.

setStreamingAudio

public void setStreamingAudio(boolean streamingAudio)
Sets streaming audio. If true, output will be sent to

Parameters:
streamingAudio - if true stream audio

main

public static void main(java.lang.String[] args)
The main entry point for FreeTTS.