Class: Vapi::Types::ClientMessageAssistantSpeechTiming
- Inherits:
-
Internal::Types::Model
- Object
- Internal::Types::Model
- Vapi::Types::ClientMessageAssistantSpeechTiming
- Extended by:
- Internal::Types::Union
- Defined in:
- lib/vapi/types/client_message_assistant_speech_timing.rb
Overview
Optional timing metadata. Shape depends on timing.type:
-
word-alignment(ElevenLabs): per-character timing at playback cadence. words includes space entries. Best consumed by tracking a running character count: join timing.words, add to a char cursor, and highlight text up to that position. No interpolation needed. -
word-progress(Minimax with voice.subtitleType: 'word'): cursor- based word count per TTS segment. Use wordsSpoken as the anchor, interpolate forward using segmentDurationMs or timing.words until the next event arrives.
When absent, the event is a text-only fallback for providers without word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once per TTS chunk when audio is playing. Optionally interpolate a word cursor at ~3.5 words/sec between events for approximate tracking.
Method Summary
Methods included from Internal::Types::Union
coerce, discriminant, load, member, members, type_member?
Methods included from Internal::Types::Type
Methods included from Internal::JSON::Serializable
Methods inherited from Internal::Types::Model
#==, ===, add_extra_field_definition, coerce, extra_fields, field, fields, #initialize, #inspect, literal, load, #to_h
Constructor Details
This class inherits a constructor from Vapi::Internal::Types::Model