Documentation

Support

Vivox Unreal SDK

Vivox Unreal SDK

Cancel a text-to-speech message

Cancel a queued text-to-speech message.
Read time 1 minuteLast updated 2 days ago

To cancel a currently playing or enqueued text-to-speech (TTS) message, use
ITextToSpeech::CancelMessage()
with the
ITTSMessage
that you want to cancel. For example:
ITTSMessage *Message;MyLoginSession->TTS().Speak("Some Text", TTSDestination::RemoteTransmission, &Message);MyLoginSession->TTS().CancelMessage(*Message);
In destinations that contain queues, canceling an ongoing TTS message automatically triggers playback of the next message. Canceling an enqueued TTS message shifts all later messages up one place in the queue. You can cancel all TTS messages in a destination (ongoing and enqueued), or all TTS messages in all destinations.
// Cancel all TTS messages in the destination for Queued Local PlaybackMyLoginSession->TTS().CancelDestination(TTSDestination::QueuedLocalPlayback);// Cancel all TTS messages in all destinationsMyLoginSession->TTS().CancelAll();