Documentation

Support

Vivox Core SDK

Vivox Core SDK

Cancel a text-to-speech message

Cancel a queued text-to-speech message.
Read time 1 minuteLast updated 20 hours ago

To cancel a currently playing or enqueued text-to-speech (TTS) message, use
vx_tts_cancel_utterance
with the utterance ID of the message that you want to cancel. For example:
vx_tts_utterance_id firstUtteranceId;vx_tts_speak(managerId, voiceId, "Example message, this is great!", tts_dest_queued_local_playback, &utteranceId);vx_tts_cancel_utterance(managerId, utteranceId);
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 a destination:
    vx_tts_cancel_all_in_dest(managerId
    ,
    tts_dest_queued_local_playback);
  • Cancel all TTS messages in all destinations:
    vx_tts_cancel_all(managerId);