Class RealtimeTranslationSession
-
- All Implemented Interfaces:
public final class RealtimeTranslationSessionA Realtime translation session. Translation sessions continuously translate input audio into the configured output language.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRealtimeTranslationSession.BuilderA builder for RealtimeTranslationSession.
public final classRealtimeTranslationSession.AudioConfiguration for translation input and output audio.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for the session that looks like sess_1234567890abcdef.final RealtimeTranslationSession.Audioaudio()Configuration for translation input and output audio. final LongexpiresAt()Expiration timestamp for the session, in seconds since epoch. final Stringmodel()The Realtime translation model used for this session. final JsonValue_type()The session type. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<RealtimeTranslationSession.Audio>_audio()Returns the raw JSON value of audio. final JsonField<Long>_expiresAt()Returns the raw JSON value of expiresAt. final JsonField<String>_model()Returns the raw JSON value of model. final Map<String, JsonValue>_additionalProperties()final RealtimeTranslationSession.BuildertoBuilder()final RealtimeTranslationSessionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RealtimeTranslationSession.Builderbuilder()Returns a mutable builder for constructing an instance of RealtimeTranslationSession. -
-
Method Detail
-
audio
final RealtimeTranslationSession.Audio audio()
Configuration for translation input and output audio.
-
model
final String model()
The Realtime translation model used for this session. This field is set at session creation and cannot be changed with
session.update.
-
_type
final JsonValue _type()
The session type. Always
translationfor Realtime translation sessions.Expected to always return the following:
JsonValue.from("translation")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_audio
final JsonField<RealtimeTranslationSession.Audio> _audio()
Returns the raw JSON value of audio.
Unlike audio, this method doesn't throw if the JSON field has an unexpected type.
-
_expiresAt
final JsonField<Long> _expiresAt()
Returns the raw JSON value of expiresAt.
Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeTranslationSession.Builder toBuilder()
-
validate
final RealtimeTranslationSession 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 RealtimeTranslationSession.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeTranslationSession.
The following fields are required:
.id() .audio() .expiresAt() .model()
-
-
-
-