TranscriptionVerboseResponse.fromJson constructor
Creates a TranscriptionVerboseResponse from JSON.
Implementation
factory TranscriptionVerboseResponse.fromJson(Map<String, dynamic> json) {
return TranscriptionVerboseResponse(
task: json['task'] as String,
language: json['language'] as String,
duration: (json['duration'] as num).toDouble(),
text: json['text'] as String,
segments: (json['segments'] as List<dynamic>?)
?.map((e) => TranscriptionSegment.fromJson(e as Map<String, dynamic>))
.toList(),
words: (json['words'] as List<dynamic>?)
?.map((e) => TranscriptionWord.fromJson(e as Map<String, dynamic>))
.toList(),
);
}