Class: Telnyx::Models::StreamServerEvent::AudioChunk
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::StreamServerEvent::AudioChunk
- Defined in:
- lib/telnyx/models/stream_server_event.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#audio ⇒ String?
Base64-encoded audio data.
-
#cached ⇒ Boolean?
Whether this audio was served from cache.
-
#is_final ⇒ Boolean?
Always ‘false` for audio chunk frames.
-
#text ⇒ String?
The text segment that this audio chunk corresponds to.
-
#time_to_first_audio_frame_ms ⇒ Integer?
Milliseconds from the start-of-speech request to the first audio frame.
-
#type ⇒ Symbol, ...
Frame type identifier.
Instance Method Summary collapse
-
#initialize(audio: nil, cached: nil, is_final: nil, text: nil, time_to_first_audio_frame_ms: nil, type: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see AudioChunk for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(audio: nil, cached: nil, is_final: nil, text: nil, time_to_first_audio_frame_ms: nil, type: nil) ⇒ Object
Some parameter documentations has been truncated, see Telnyx::Models::StreamServerEvent::AudioChunk for more details.
Server-to-client frame containing a base64-encoded audio chunk.
|
|
# File 'lib/telnyx/models/stream_server_event.rb', line 60
|
Instance Attribute Details
#audio ⇒ String?
Base64-encoded audio data. May be ‘null` for providers that use `drop_concatenated_audio` mode (Telnyx Natural/NaturalHD, Rime, Minimax, MurfAI, Resemble) — in that case only streamed chunks carry audio.
27 |
# File 'lib/telnyx/models/stream_server_event.rb', line 27 optional :audio, String, nil?: true |
#cached ⇒ Boolean?
Whether this audio was served from cache.
33 |
# File 'lib/telnyx/models/stream_server_event.rb', line 33 optional :cached, Telnyx::Internal::Type::Boolean |
#is_final ⇒ Boolean?
Always ‘false` for audio chunk frames.
39 |
# File 'lib/telnyx/models/stream_server_event.rb', line 39 optional :is_final, Telnyx::Internal::Type::Boolean, api_name: :isFinal |
#text ⇒ String?
The text segment that this audio chunk corresponds to.
45 |
# File 'lib/telnyx/models/stream_server_event.rb', line 45 optional :text, String, nil?: true |
#time_to_first_audio_frame_ms ⇒ Integer?
Milliseconds from the start-of-speech request to the first audio frame. Only present on the first audio chunk of a synthesis request.
52 |
# File 'lib/telnyx/models/stream_server_event.rb', line 52 optional :time_to_first_audio_frame_ms, Integer, api_name: :timeToFirstAudioFrameMs |
#type ⇒ Symbol, ...
Frame type identifier.
58 |
# File 'lib/telnyx/models/stream_server_event.rb', line 58 optional :type, enum: -> { Telnyx::Models::StreamServerEvent::AudioChunk::Type } |