getSpeechSynthesisTask method

Future<GetSpeechSynthesisTaskOutput> getSpeechSynthesisTask({
  1. required String taskId,
})

Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task.

May throw InvalidTaskIdException. May throw ServiceFailureException. May throw SynthesisTaskNotFoundException.

Parameter taskId : The Amazon Polly generated identifier for a speech synthesis task.

Implementation

Future<GetSpeechSynthesisTaskOutput> getSpeechSynthesisTask({
  required String taskId,
}) async {
  ArgumentError.checkNotNull(taskId, 'taskId');
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/synthesisTasks/${Uri.encodeComponent(taskId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetSpeechSynthesisTaskOutput.fromJson(response);
}