toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'audio_data': audioData,
      if (contentType != null) 'content_type': contentType,
      if (duration != null) 'duration': duration,
      if (sampleRate != null) 'sample_rate': sampleRate,
      if (voice != null) 'voice': voice,
      if (model != null) 'model': model,
      if (usage != null) 'usage': usage!.toJson(),
      if (alignment != null) 'alignment': alignment!.toJson(),
      if (normalizedAlignment != null)
        'normalized_alignment': normalizedAlignment!.toJson(),
      if (requestId != null) 'request_id': requestId,
    };