toJson method
Implementation
Map<String, dynamic> toJson() => {
'text': text,
if (language != null) 'language': language,
if (confidence != null) 'confidence': confidence,
if (words != null) 'words': words!.map((w) => w.toJson()).toList(),
if (segments != null)
'segments': segments!.map((s) => s.toJson()).toList(),
if (model != null) 'model': model,
if (duration != null) 'duration': duration,
if (usage != null) 'usage': usage!.toJson(),
if (languageProbability != null)
'language_probability': languageProbability,
if (additionalFormats != null) 'additional_formats': additionalFormats,
};