copyWith method

RealtimeAudioConfigInput copyWith({
  1. Object? format = unsetCopyWithValue,
  2. Object? noiseReduction = unsetCopyWithValue,
  3. Object? transcription = unsetCopyWithValue,
  4. Object? turnDetection = unsetCopyWithValue,
  5. bool? clearNoiseReduction,
  6. bool? clearTranscription,
  7. bool? clearTurnDetection,
})

Returns a copy of this RealtimeAudioConfigInput with the given fields replaced. Pass null for any nullable field to clear the in-memory value (use the clear* flags to send explicit JSON null over the wire).

Implementation

RealtimeAudioConfigInput copyWith({
  Object? format = unsetCopyWithValue,
  Object? noiseReduction = unsetCopyWithValue,
  Object? transcription = unsetCopyWithValue,
  Object? turnDetection = unsetCopyWithValue,
  bool? clearNoiseReduction,
  bool? clearTranscription,
  bool? clearTurnDetection,
}) => RealtimeAudioConfigInput(
  format: identical(format, unsetCopyWithValue)
      ? this.format
      : format as RealtimeAudioFormats?,
  noiseReduction: identical(noiseReduction, unsetCopyWithValue)
      ? this.noiseReduction
      : noiseReduction as AudioInputNoiseReduction?,
  transcription: identical(transcription, unsetCopyWithValue)
      ? this.transcription
      : transcription as InputAudioTranscription?,
  turnDetection: identical(turnDetection, unsetCopyWithValue)
      ? this.turnDetection
      : turnDetection as RealtimeAudioInputTurnDetection?,
  clearNoiseReduction: clearNoiseReduction ?? this.clearNoiseReduction,
  clearTranscription: clearTranscription ?? this.clearTranscription,
  clearTurnDetection: clearTurnDetection ?? this.clearTurnDetection,
);