org.jvoicexml.implementation.jsapi10.speakstrategy
Class TextSpeakStrategy

java.lang.Object
  extended by org.jvoicexml.implementation.jsapi10.speakstrategy.TextSpeakStrategy
All Implemented Interfaces:
SSMLSpeakStrategy

public final class TextSpeakStrategy
extends Object

SSML strategy to play back a text node.

Since:
0.5
Version:
$Revision: 125 $

Copyright © 2006 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle

Constructor Summary
TextSpeakStrategy()
          Creates a new object.
 
Method Summary
 void speak(AudioOutput audioOutput, DocumentServer documentServer, SsmlNode node)
          Speaks the given node.
protected  void speakChildNodes(AudioOutput audioOutput, DocumentServer documentServer, SsmlNode node)
          Calls the speak method for all child nodes of the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSpeakStrategy

public TextSpeakStrategy()
Creates a new object.

Method Detail

speak

public void speak(AudioOutput audioOutput,
                  DocumentServer documentServer,
                  SsmlNode node)
           throws NoresourceError,
                  BadFetchError
Speaks the given node.

Parameters:
audioOutput - The synthesizer to use.
documentServer - The document server to acqure further documents, i.e. for the <audio> tag to retrieve the audio file to play.
node - The node to speak.
Throws:
NoresourceError - No recognizer allocated.
BadFetchError - Recognizer in wrong state.

speakChildNodes

protected void speakChildNodes(AudioOutput audioOutput,
                               DocumentServer documentServer,
                               SsmlNode node)
                        throws NoresourceError,
                               BadFetchError
Calls the speak method for all child nodes of the given node.

Parameters:
audioOutput - The system output to use.
documentServer - The document server.
node - The current node.
Throws:
NoresourceError - No recognizer allocated.
BadFetchError - Recognizer in wrong state.


Copyright © 2005-2007 JVoiceXML group.