playTaggedMessage

fun playTaggedMessage(taggedMessage: TaggedMessage, config: MessageConfig, playbackListener: MessagePlaybackListener): Cancellable

Synthesizes a tagged message. Parsing to a supported message format is done in the underlying TextToSpeechEngine. Message queuing depends on MessageConfig.priority. If the message currently being synthesized has priority equal or higher to the taggedMessage, the new message will be added to the queue (taking the priorities of queued messages into account). If the message currently being synthesized has a lower priority, it will be interrupted and taggedMessage will be processed right away.

Return

Cancellable which can be used to cancel the operation. If taggedMessage processing has already started, it will be stopped and MessagePlaybackListener.onStop will be called.

See also

Parameters

taggedMessage

Audio message to be synthesized.

playbackListener

Listener that reports the state of taggedMessage playback.