TurnDetection.fromJson constructor
Creates a TurnDetection from JSON.
Implementation
factory TurnDetection.fromJson(Map<String, dynamic> json) {
return TurnDetection(
type: json['type'] != null
? TurnDetectionType.fromJson(json['type'] as String)
: null,
threshold: (json['threshold'] as num?)?.toDouble(),
prefixPaddingMs: json['prefix_padding_ms'] as int?,
silenceDurationMs: json['silence_duration_ms'] as int?,
createResponse: json['create_response'] as bool?,
);
}