Queue a text-to-speech message
Some destinations offer a built-in queuing system. When a new message is injected and there is an ongoing message playing, then the new message is put into a queue. After the ongoing message finishes playing, the next message in the queue automatically begins playing.
// Returns VxErrorSuccess and starts playing immediately.
MyLoginSession->TTS().Speak("First Message.", TTSDestination::QueuedLocalPlayback);
// Returns VxStatusTTSInputTextWasEnqueued and put in a queue.
// After the first message finishes playback, this message will start.
MyLoginSession->TTS().Speak("Second Message.", TTSDestination::QueuedLocalPlayback);
A queue is shared between TTSDestination::QueuedRemoteTransmission
and TTSDestination::QueuedRemoteTransmissionWithLocalPlayback
. The destination TTSDestination::QueuedLocalPlayback
has its own queue.
A destination queue can hold up to 10 messages. If a message is added when a destination queue is full, the Vivox SDK discards the message and the method returns the error VxErrorTTSDestinationQueueIsFull
. In this case, no text-to-speech related events are raised.