Class RealtimeTranslationOutputAudioDeltaEvent
-
- All Implemented Interfaces:
public final class RealtimeTranslationOutputAudioDeltaEventReturned when translated output audio is available. Output audio deltas are 200 ms frames of PCM16 audio.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRealtimeTranslationOutputAudioDeltaEvent.BuilderA builder for RealtimeTranslationOutputAudioDeltaEvent.
public final classRealtimeTranslationOutputAudioDeltaEvent.FormatAudio encoding for
delta.
-
Method Summary
Modifier and Type Method Description final Stringdelta()Base64-encoded translated audio data. final StringeventId()The unique ID of the server event. final JsonValue_type()The event type, must be session.output_audio.delta.final Optional<Long>channels()Number of audio channels. final Optional<Long>elapsedMs()Timing metadata for stream alignment, derived from the translation frame when available. final Optional<RealtimeTranslationOutputAudioDeltaEvent.Format>format()Audio encoding for delta.final Optional<Long>sampleRate()Sample rate of the audio delta. final JsonField<String>_delta()Returns the raw JSON value of delta. final JsonField<String>_eventId()Returns the raw JSON value of eventId. final JsonField<Long>_channels()Returns the raw JSON value of channels. final JsonField<Long>_elapsedMs()Returns the raw JSON value of elapsedMs. final JsonField<RealtimeTranslationOutputAudioDeltaEvent.Format>_format()Returns the raw JSON value of format. final JsonField<Long>_sampleRate()Returns the raw JSON value of sampleRate. final Map<String, JsonValue>_additionalProperties()final RealtimeTranslationOutputAudioDeltaEvent.BuildertoBuilder()final RealtimeTranslationOutputAudioDeltaEventvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RealtimeTranslationOutputAudioDeltaEvent.Builderbuilder()Returns a mutable builder for constructing an instance of RealtimeTranslationOutputAudioDeltaEvent. -
-
Method Detail
-
_type
final JsonValue _type()
The event type, must be
session.output_audio.delta.Expected to always return the following:
JsonValue.from("session.output_audio.delta")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
elapsedMs
final Optional<Long> elapsedMs()
Timing metadata for stream alignment, derived from the translation frame when available. Treat
elapsed_msas alignment metadata, not a unique event identifier.
-
format
final Optional<RealtimeTranslationOutputAudioDeltaEvent.Format> format()
Audio encoding for
delta.
-
sampleRate
final Optional<Long> sampleRate()
Sample rate of the audio delta.
-
_delta
final JsonField<String> _delta()
Returns the raw JSON value of delta.
Unlike delta, this method doesn't throw if the JSON field has an unexpected type.
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_channels
final JsonField<Long> _channels()
Returns the raw JSON value of channels.
Unlike channels, this method doesn't throw if the JSON field has an unexpected type.
-
_elapsedMs
final JsonField<Long> _elapsedMs()
Returns the raw JSON value of elapsedMs.
Unlike elapsedMs, this method doesn't throw if the JSON field has an unexpected type.
-
_format
final JsonField<RealtimeTranslationOutputAudioDeltaEvent.Format> _format()
Returns the raw JSON value of format.
Unlike format, this method doesn't throw if the JSON field has an unexpected type.
-
_sampleRate
final JsonField<Long> _sampleRate()
Returns the raw JSON value of sampleRate.
Unlike sampleRate, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeTranslationOutputAudioDeltaEvent.Builder toBuilder()
-
validate
final RealtimeTranslationOutputAudioDeltaEvent validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static RealtimeTranslationOutputAudioDeltaEvent.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeTranslationOutputAudioDeltaEvent.
The following fields are required:
.delta() .eventId()
-
-
-
-