describeSpeaker method

Future<DescribeSpeakerResponse> describeSpeaker({
  1. required String domainId,
  2. required String speakerId,
})

Describes the specified speaker.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainId : The identifier of the domain that contains the speaker.

Parameter speakerId : The identifier of the speaker you are describing.

Implementation

Future<DescribeSpeakerResponse> describeSpeaker({
  required String domainId,
  required String speakerId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'VoiceID.DescribeSpeaker'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DomainId': domainId,
      'SpeakerId': speakerId,
    },
  );

  return DescribeSpeakerResponse.fromJson(jsonResponse.body);
}