public interface SynthesizedOutput extends ExternalResource, OutputDevice
Objects that implement this interface support audio output text-to-speech (TTS).
It is guaranteed that the session remains the same between the calls to
RemoteConnectable.connect(org.jvoicexml.ConnectionInformation)
and
RemoteConnectable.disconnect(org.jvoicexml.ConnectionInformation).
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(SynthesizedOutputListener listener)
Adds the listener for system output events.
|
void |
queueSpeakable(SpeakableText speakable,
java.lang.String sessionId,
DocumentServer documentServer)
The Speakable object is added to the end of the speaking queue and will
be spoken once it reaches the top of the queue.
|
void |
removeListener(SynthesizedOutputListener listener)
Removes the listener for system output events.
|
void |
waitNonBargeInPlayed()
Delays until all prompts are played that do not allow for barge-in.
|
void |
waitQueueEmpty()
Convenient method to wait until all output is being played.
|
activate, close, getType, isBusy, open, passivateconnect, disconnectcancelOutput, isBusy, supportsBargeInvoid queueSpeakable(SpeakableText speakable, java.lang.String sessionId, DocumentServer documentServer) throws NoresourceError, BadFetchError
speakable - Text to be spoken.sessionId - the current session iddocumentServer - The document server to use.NoresourceError - The output resource is not available.BadFetchError - A URI within the speakable could not be obtained or a
parsing error occurred.void waitNonBargeInPlayed()
void waitQueueEmpty()
void addListener(SynthesizedOutputListener listener)
The implementation of this interface must notify the listener about all events.
listener - the listener to add.void removeListener(SynthesizedOutputListener listener)
listener - the listener to remove.