RealtimeTranslationSessionAudioInput class

Input audio configuration for a translation session.

Tri-state serialization for transcription and noise_reduction — translation session.update events use the same convention as realtime sessions:

  • Field omitted → server keeps the current value (don't change).
  • Field with value → server sets/replaces the configuration.
  • Field with explicit JSON null → server disables the feature.

To send the third form, pass clearTranscription / clearNoiseReduction as true. The flags are ignored when the corresponding typed field is non-null. Roundtrip preserves the distinction.

Annotations
  • @immutable

Constructors

RealtimeTranslationSessionAudioInput({RealtimeTranslationInputTranscription? transcription, RealtimeTranslationNoiseReduction? noiseReduction, bool clearTranscription = false, bool clearNoiseReduction = false})
Creates a RealtimeTranslationSessionAudioInput.
const
RealtimeTranslationSessionAudioInput.fromJson(Map<String, dynamic> json)
Creates from JSON.
factory

Properties

clearNoiseReduction bool
When true, emit "noise_reduction": null on the wire to ask the server to disable noise reduction. Has no effect when noiseReduction is non-null.
final
clearTranscription bool
When true, emit "transcription": null on the wire to ask the server to disable transcription. Has no effect when transcription is non-null.
final
hashCode int
The hash code for this object.
no setteroverride
noiseReduction RealtimeTranslationNoiseReduction?
Noise reduction configuration.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transcription RealtimeTranslationInputTranscription?
Source-language transcription configuration.
final

Methods

copyWith({Object? transcription = unsetCopyWithValue, Object? noiseReduction = unsetCopyWithValue, bool? clearTranscription, bool? clearNoiseReduction}) RealtimeTranslationSessionAudioInput
Returns a copy of this with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override