toJson method

Map<String, dynamic> toJson()

Converts to JSON.

type is only emitted when explicitly set. The bare /realtime/transcription_sessions endpoint rejects unknown parameters; the /realtime/client_secrets wrapper injects 'type': 'transcription' itself when serializing the embedded session.

Implementation

Map<String, dynamic> toJson() => {
  if (type != null) 'type': type,
  if (audio != null) 'audio': audio!.toJson(),
  if (include != null) 'include': include,
};