pgbennett.speech
Class ESpeakSpeaker

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

public class ESpeakSpeaker
extends java.lang.Object
implements SpeechInterface


Constructor Summary
ESpeakSpeaker()
          Creates a new instance of CepstralSpeaker
 
Method Summary
 boolean close()
          Close file or sound output device
 java.lang.String[] getVoiceList()
           
 boolean init()
           
 void setPaths(java.lang.String espeakProg, java.lang.String espeakDataPath, java.lang.String mbrolaProg, java.lang.String mbrolaBase, java.lang.String mixerName, java.lang.String mixerGain)
           
 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

ESpeakSpeaker

public ESpeakSpeaker()
Creates a new instance of CepstralSpeaker

Method Detail

close

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

Specified by:
close in interface SpeechInterface

setPaths

public void setPaths(java.lang.String espeakProg,
                     java.lang.String espeakDataPath,
                     java.lang.String mbrolaProg,
                     java.lang.String mbrolaBase,
                     java.lang.String mixerName,
                     java.lang.String mixerGain)

init

public boolean init()
Specified by:
init 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

setVoice

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

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