Class: OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent
- Defined in:
- lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb,
sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs
Defined Under Namespace
Modules: Format
Instance Attribute Summary collapse
-
#channels ⇒ Integer?
Number of audio channels.
-
#delta ⇒ String
Base64-encoded translated audio data.
-
#elapsed_ms ⇒ Integer?
Timing metadata for stream alignment, derived from the translation frame when available.
-
#event_id ⇒ String
The unique ID of the server event.
-
#format_ ⇒ OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::format_?
Audio encoding for
delta. -
#sample_rate ⇒ Integer?
Sample rate of the audio delta.
-
#type ⇒ :"session.output_audio.delta"
The event type, must be
session.output_audio.delta.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(delta:, event_id:, channels: nil, elapsed_ms: nil, format_: nil, sample_rate: nil, type: :"session.output_audio.delta") ⇒ RealtimeTranslationOutputAudioDeltaEvent
constructor
A new instance of RealtimeTranslationOutputAudioDeltaEvent.
- #to_hash ⇒ { delta: String, event_id: String, ?type: :"session.output_audio.delta", ?channels: Integer, ?elapsed_ms: Integer?, ?format_: OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::format_, ?sample_rate: Integer }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(delta:, event_id:, channels: nil, elapsed_ms: nil, format_: nil, sample_rate: nil, type: :"session.output_audio.delta") ⇒ RealtimeTranslationOutputAudioDeltaEvent
Returns a new instance of RealtimeTranslationOutputAudioDeltaEvent.
|
|
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 55
|
Instance Attribute Details
#channels ⇒ Integer?
Number of audio channels.
29 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 29 optional :channels, Integer |
#delta ⇒ String
Base64-encoded translated audio data.
11 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 11 required :delta, String |
#elapsed_ms ⇒ Integer?
Timing metadata for stream alignment, derived from the translation frame when
available. Treat elapsed_ms as alignment metadata, not a unique event
identifier.
37 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 37 optional :elapsed_ms, Integer, nil?: true |
#event_id ⇒ String
The unique ID of the server event.
17 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 17 required :event_id, String |
#format_ ⇒ OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::format_?
Audio encoding for delta.
43 44 45 46 47 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 43 optional( :format_, enum: -> { OpenAI::Realtime::RealtimeTranslationOutputAudioDeltaEvent::Format }, api_name: :format ) |
#sample_rate ⇒ Integer?
Sample rate of the audio delta.
53 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 53 optional :sample_rate, Integer |
#type ⇒ :"session.output_audio.delta"
The event type, must be session.output_audio.delta.
23 |
# File 'lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb', line 23 required :type, const: :"session.output_audio.delta" |
Instance Method Details
#to_hash ⇒ { delta: String, event_id: String, ?type: :"session.output_audio.delta", ?channels: Integer, ?elapsed_ms: Integer?, ?format_: OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::format_, ?sample_rate: Integer }
76 77 78 79 80 81 82 83 84 |
# File 'sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs', line 76
def to_hash: -> {
delta: String,
event_id: String,
?type: :"session.output_audio.delta",
?channels: Integer,
?elapsed_ms: Integer?,
?format_: OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::format_,
?sample_rate: Integer
}
|