Class: OpenAI::Models::Realtime::RealtimeTranslationOutputTranscriptDeltaEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(delta:, event_id:, elapsed_ms: nil, type: :"session.output_transcript.delta") ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Realtime::RealtimeTranslationOutputTranscriptDeltaEvent for more details.

Returned when translated transcript text is available.

Transcript deltas are append-only text fragments. Clients should not insert unconditional spaces between deltas.

Parameters:

  • delta (String)

    Append-only transcript text for the translated output audio.

  • event_id (String)

    The unique ID of the server event.

  • elapsed_ms (Integer, nil) (defaults to: nil)

    Timing metadata for stream alignment, derived from the translation frame

  • type (Symbol, :"session.output_transcript.delta") (defaults to: :"session.output_transcript.delta")

    The event type, must be ‘session.output_transcript.delta`.



# File 'lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb', line 34

Instance Attribute Details

#deltaString

Append-only transcript text for the translated output audio.

Returns:

  • (String)


11
# File 'lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb', line 11

required :delta, String

#elapsed_msInteger?

Timing metadata for stream alignment, derived from the translation frame when available. It advances in 200 ms increments, but multiple transcript deltas may share the same ‘elapsed_ms`. Treat it as alignment metadata, not a unique transcript-delta identifier.

Returns:

  • (Integer, nil)


32
# File 'lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb', line 32

optional :elapsed_ms, Integer, nil?: true

#event_idString

The unique ID of the server event.

Returns:

  • (String)


17
# File 'lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb', line 17

required :event_id, String

#typeSymbol, :"session.output_transcript.delta"

The event type, must be ‘session.output_transcript.delta`.

Returns:

  • (Symbol, :"session.output_transcript.delta")


23
# File 'lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb', line 23

required :type, const: :"session.output_transcript.delta"