devs.speechpackage
Class SpeechGenerator
java.lang.Object
javax.speech.synthesis.SpeakableAdapter
devs.speechpackage.SpeechGenerator
- All Implemented Interfaces:
- BioDevice, java.util.EventListener, javax.speech.synthesis.SpeakableListener, MNSListener
public class SpeechGenerator
- extends javax.speech.synthesis.SpeakableAdapter
- implements BioDevice
The main speak device for the interface. To be done : - voice changing -
voice manipulation - create a graphical interface to the voice manipulation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpeechGenerator
public SpeechGenerator()
load
public void load(MNSEvent cnE)
- Description copied from interface:
BioDevice
- simple interface to control all Devices
- Specified by:
load
in interface BioDevice
loadCNTR
public void loadCNTR(MNSEvent mnE)
- Specified by:
loadCNTR
in interface BioDevice
process
public void process(MNSEvent cnv)
- Description copied from interface:
MNSListener
- loads a CNSEvent into a listener
- Specified by:
process
in interface MNSListener
getControls
public java.lang.String getControls()
- Specified by:
getControls
in interface BioDevice
- Returns:
flushQueue
public void flushQueue()
addListener
public void addListener(BioDeviceListener rP)
- Specified by:
addListener
in interface BioDevice
getCurrentPosition
public int getCurrentPosition()
- Specified by:
getCurrentPosition
in interface BioDevice
- Returns:
getCurrentState
public int getCurrentState()
- Specified by:
getCurrentState
in interface BioDevice
- Returns:
getVoices
public java.lang.String[] getVoices()
- Returns:
- an array of strings representing the voices
getVolume
public float getVolume()
- Returns:
- - the volume
getRate
public float getRate()
- Returns:
- - the speed of speech
getPitch
public float getPitch()
- Returns:
- - the pitch value
getPitchRange
public float getPitchRange()
- Returns:
- - the effective pitch range
speakLine
public void speakLine(java.lang.String line)
- speaks a simple non-JSML line of text
- Parameters:
line
- -
String
speakFile
public void speakFile(java.io.File f)
- speaks a JSML formated text
- Parameters:
f
- -
the file to speak
markerReached
public void markerReached(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
markerReached
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
markerReached
in class javax.speech.synthesis.SpeakableAdapter
speakableCancelled
public void speakableCancelled(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
speakableCancelled
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
speakableCancelled
in class javax.speech.synthesis.SpeakableAdapter
speakableEnded
public void speakableEnded(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
speakableEnded
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
speakableEnded
in class javax.speech.synthesis.SpeakableAdapter
speakablePaused
public void speakablePaused(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
speakablePaused
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
speakablePaused
in class javax.speech.synthesis.SpeakableAdapter
speakableResumed
public void speakableResumed(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
speakableResumed
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
speakableResumed
in class javax.speech.synthesis.SpeakableAdapter
speakableStarted
public void speakableStarted(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
speakableStarted
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
speakableStarted
in class javax.speech.synthesis.SpeakableAdapter
topOfQueue
public void topOfQueue(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
topOfQueue
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
topOfQueue
in class javax.speech.synthesis.SpeakableAdapter
wordStarted
public void wordStarted(javax.speech.synthesis.SpeakableEvent e)
- Specified by:
wordStarted
in interface javax.speech.synthesis.SpeakableListener
- Overrides:
wordStarted
in class javax.speech.synthesis.SpeakableAdapter
getname
public java.lang.String getname()
- Specified by:
getname
in interface BioDevice
- Returns:
- the name of this element
setName
public void setName(java.lang.String name)
- Parameters:
name
-