RealtimeAudioConfigOutput.fromJson constructor

RealtimeAudioConfigOutput.fromJson(
  1. Map<String, dynamic> json
)

Creates from JSON.

Implementation

factory RealtimeAudioConfigOutput.fromJson(Map<String, dynamic> json) {
  return RealtimeAudioConfigOutput(
    format: json['format'] != null
        ? RealtimeAudioFormats.fromJson(
            json['format'] as Map<String, dynamic>,
          )
        : null,
    voice: json['voice'] as String?,
    speed: (json['speed'] as num?)?.toDouble(),
  );
}