org.jvoicexml
Class SpeakableSsmlText

java.lang.Object
  extended by org.jvoicexml.SpeakableSsmlText
All Implemented Interfaces:
SpeakableText

public final class SpeakableSsmlText
extends Object
implements SpeakableText

Text to be passed to the TTS engine. This text may contain SSML markups, as defined in http://www.w3.org/TR/2003/CR-speech-synthesis-20031218/.

Since:
0.4
Version:
$LastChangedRevision: 2493 $
Author:
Dirk Schnelle-Walka

Constructor Summary
SpeakableSsmlText(SsmlDocument doc)
          Constructs a new object.
SpeakableSsmlText(SsmlDocument doc, boolean useBargein, BargeInType type)
          Constructs a new object.
 
Method Summary
 SpeakableText appendSpeakableText(String str)
          Appends the given text to this speakable.
 boolean equals(Object other)
          
 BargeInType getBargeInType()
          Retrieves the barge-in type.
 SsmlDocument getDocument()
          Retrieves the SSML document to speak.
 String getSpeakableText()
          Retrieves the text to be passed to the TTS Engine.
 long getTimeout()
          Retrieves the timeout of this speakable to wait before a noinput event is generated.
 int hashCode()
          
 boolean isBargeInEnabled()
          Checks is barge-in is enabled for this speakable.
 boolean isSpeakableTextEmpty()
          Checks if this speakable contains any text to be passed to the TTS engine.
 void setTimeout(long msec)
          Sets the timeout that will be used for the following user input.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpeakableSsmlText

public SpeakableSsmlText(SsmlDocument doc)
Constructs a new object.

Parameters:
doc - The SSML document to speak.

SpeakableSsmlText

public SpeakableSsmlText(SsmlDocument doc,
                         boolean useBargein,
                         BargeInType type)
Constructs a new object.

Parameters:
doc - the SSML document to speak.
useBargein - true if bargein is supported.
type - the barge-in type.
Method Detail

getSpeakableText

public String getSpeakableText()
Retrieves the text to be passed to the TTS Engine.

Specified by:
getSpeakableText in interface SpeakableText
Returns:
Text to be spoken.

getDocument

public SsmlDocument getDocument()
Retrieves the SSML document to speak.

Returns:
SSML document to speak.
Since:
0.5

appendSpeakableText

public SpeakableText appendSpeakableText(String str)
Appends the given text to this speakable.

Specified by:
appendSpeakableText in interface SpeakableText
Parameters:
str - Text to be appended.
Returns:
This object.

isSpeakableTextEmpty

public boolean isSpeakableTextEmpty()
Checks if this speakable contains any text to be passed to the TTS engine.

Specified by:
isSpeakableTextEmpty in interface SpeakableText
Returns:
true if this speakable contains text.

isBargeInEnabled

public boolean isBargeInEnabled()
Checks is barge-in is enabled for this speakable.

Specified by:
isBargeInEnabled in interface SpeakableText
Returns:
true if barge-in is enabled.

getBargeInType

public BargeInType getBargeInType()
Retrieves the barge-in type.

Returns:
the barge-in type
Since:
0.7.1

getTimeout

public long getTimeout()
Retrieves the timeout of this speakable to wait before a noinput event is generated.

Returns:
number of milliseconds to wait, -1 if there is no timeout specified.
Since:
0.6

setTimeout

public void setTimeout(long msec)
Sets the timeout that will be used for the following user input.

Parameters:
msec - number of milliseconds to wait.
Since:
0.6

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object
Since:
0.6


Copyright © 2005-2010JVoiceXML group.