org.mobicents.slee.resource.tts.ra
Class TTSSessionImpl

java.lang.Object
  extended by org.mobicents.slee.resource.tts.ra.TTSSessionImpl
All Implemented Interfaces:
org.mobicents.slee.resource.tts.ratype.TTSSession

public class TTSSessionImpl
extends java.lang.Object
implements org.mobicents.slee.resource.tts.ratype.TTSSession


Constructor Summary
TTSSessionImpl(java.lang.String fileName, java.lang.String voiceName)
          Constructor for TTSSessionImpl
 
Method Summary
 void dispose()
          Shuts down this TTSSession synthesizer by closing the AudioPlayer and voice.
 boolean filetoAudioFile(java.lang.String filePath)
           
 java.lang.String getSessionId()
           
 boolean streamToAudioFile(java.io.InputStream is)
           
 boolean streamToSpeech(java.io.InputStream is)
          Converts the text contained in the given stream to speech.
 boolean textToAudioFile(java.lang.String text)
           
 boolean textToSpeech(java.lang.String text)
          Converts the given text to speech
 boolean urltoAudioFile(java.lang.String urlPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TTSSessionImpl

public TTSSessionImpl(java.lang.String fileName,
                      java.lang.String voiceName)
Constructor for TTSSessionImpl

Parameters:
fileName - This is the path of the file with fileName where you want to store the audio output. For example /NotBackedUp/tmp/test.wav.
voiceName - Used by VoiceManager to get a Voice for given voiceName
Method Detail

getSessionId

public java.lang.String getSessionId()
Specified by:
getSessionId in interface org.mobicents.slee.resource.tts.ratype.TTSSession

textToAudioFile

public boolean textToAudioFile(java.lang.String text)
Specified by:
textToAudioFile in interface org.mobicents.slee.resource.tts.ratype.TTSSession

streamToAudioFile

public boolean streamToAudioFile(java.io.InputStream is)
Specified by:
streamToAudioFile in interface org.mobicents.slee.resource.tts.ratype.TTSSession

urltoAudioFile

public boolean urltoAudioFile(java.lang.String urlPath)
Specified by:
urltoAudioFile in interface org.mobicents.slee.resource.tts.ratype.TTSSession

filetoAudioFile

public boolean filetoAudioFile(java.lang.String filePath)
Specified by:
filetoAudioFile in interface org.mobicents.slee.resource.tts.ratype.TTSSession

textToSpeech

public boolean textToSpeech(java.lang.String text)
Converts the given text to speech

Parameters:
text - the text to speak
Returns:
true if the utterance was played properly

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

dispose

public void dispose()
Shuts down this TTSSession synthesizer by closing the AudioPlayer and voice.



Copyright © 2008. All Rights Reserved.