getSampleAudio method

Future<List<int>> getSampleAudio(
  1. String voiceId,
  2. String sampleId
)

Get audio data for a voice sample Returns a list of bytes

Implementation

Future<List<int>> getSampleAudio(String voiceId, String sampleId) async {
  try {
    final response =
        await _dio.get('/v1/voices/$voiceId/samples/$sampleId/audio');
    return response.data;
  } catch (error) {
    throw _handleError(error);
  }
}