pgbennett.speech
Class FreeTTSSpeaker

java.lang.Object
  extended by pgbennett.speech.FreeTTSSpeaker
All Implemented Interfaces:
SpeechInterface

public class FreeTTSSpeaker
extends java.lang.Object
implements SpeechInterface


Constructor Summary
FreeTTSSpeaker()
          Creates a new instance of FreeTTSSpeaker
 
Method Summary
 boolean close()
          Close file or sound output device
 java.lang.String[] getVoiceList()
           
static java.lang.String[] getVoices()
           
 boolean init()
           
 void setFileName(java.lang.String fileName)
          Creates a Speaker object that outputs to a wave file.
 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeTTSSpeaker

public FreeTTSSpeaker()
Creates a new instance of FreeTTSSpeaker

Method Detail

getVoices

public static java.lang.String[] getVoices()

setFileName

public void setFileName(java.lang.String fileName)
Creates a Speaker object that outputs to a wave file.

Parameters:
fileName - File name for output wave file.

setVoice

public void setVoice(java.lang.String voiceName)
Specified by:
setVoice in interface SpeechInterface

init

public boolean init()
Specified by:
init in interface SpeechInterface

close

public boolean close()
Description copied from interface: SpeechInterface
Close file or sound output device

Specified by:
close in interface SpeechInterface

setRate

public boolean setRate(int rate)
Description copied from interface: SpeechInterface
Sets the rate (speed) of output speech

Specified by:
setRate in interface SpeechInterface
Parameters:
rate - Rate, valid values are from -10 to 10

setVolume

public boolean setVolume(int volume)
Description copied from interface: SpeechInterface
Set output volume for text, default is 100

Specified by:
setVolume in interface SpeechInterface
Parameters:
volume - Volume from 0 to 100

speak

public boolean speak(java.lang.String strInput)
Description copied from interface: SpeechInterface
Converts the given input text to speech. Text can optionally contain XML tags for controlling the speech. To use XML tags there must be an XML tag at the front of the string even if it is a dummy field name or an empty tag.

Specified by:
speak in interface SpeechInterface
Parameters:
strInput - String with words to convert to speech

getVoiceList

public java.lang.String[] getVoiceList()
Specified by:
getVoiceList in interface SpeechInterface