Text-to-speech events
Learn about text-to-speech event callbacks.
Read time 1 minuteLast updated 20 hours ago
Text-to-speech (TTS) reports the following events through the standard Vivox events reporting mechanism:
-
- Raised when a TTS message has finished preparing for playback and is starting to play.
vx_evt_tts_injection_started- - The number of active sessions (for
num_consumers) or local playback players (fortts_dest_remote_transmission) that the TTS message is injected into.tts_dest_local_playback - - The unique identifier of the TTS message or utterance. This is the same identifier as the one that is returned to you when calling
utterance_id.vx_tts_speak - - The duration of the utterance in seconds.
utterance_duration - - The destination into which the TTS message is injected.
tts_destination
-
- Raised when a TTS message finishes playback.
vx_evt_tts_injection_ended- - The number of active sessions (for
num_consumers) or local playback players (fortts_dest_remote_transmission) that the TTS message is injected into.tts_dest_local_playback - - The unique identifier of the TTS message or utterance. This is the same identifier as the one that is returned to you when calling
utterance_id.vx_tts_speak - - The destination into which the TTS message is injected.
tts_destination
-
- Raised when playback of a TTS message has failed.
vx_evt_tts_injection_failed- - The error code of the failure.
status - - The unique identifier of the TTS message or utterance. This is the same identifier as the one that is returned to you when calling
utterance_id.vx_tts_speak - - The destination into which the TTS message is injected.
tts_destination