getVoice method

Future<Voice> getVoice(
  1. String voiceId
)

Get voice metadata Returns a Voice object

Implementation

Future<Voice> getVoice(String voiceId) async {
  try {
    final params = {'with_settings': true};
    final response =
        await _dio.get('/v1/voices/$voiceId', queryParameters: params);
    return Voice.fromJson(response.data);
  } catch (error) {
    throw _handleError(error);
  }
}