startSpeakerSearchTask method
Starts a speaker search task.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw NotFoundException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter identifier :
The unique identifier of the resource to be updated. Valid values include
the ID and ARN of the media insights pipeline.
Parameter voiceProfileDomainArn :
The ARN of the voice profile domain that will store the voice profile.
Parameter clientRequestToken :
The unique identifier for the client request. Use a different token for
different speaker search tasks.
Parameter kinesisVideoStreamSourceTaskConfiguration :
The task configuration for the Kinesis video stream source of the media
insights pipeline.
Implementation
Future<StartSpeakerSearchTaskResponse> startSpeakerSearchTask({
required String identifier,
required String voiceProfileDomainArn,
String? clientRequestToken,
KinesisVideoStreamSourceTaskConfiguration?
kinesisVideoStreamSourceTaskConfiguration,
}) async {
final $payload = <String, dynamic>{
'VoiceProfileDomainArn': voiceProfileDomainArn,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (kinesisVideoStreamSourceTaskConfiguration != null)
'KinesisVideoStreamSourceTaskConfiguration':
kinesisVideoStreamSourceTaskConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/media-insights-pipelines/${Uri.encodeComponent(identifier)}/speaker-search-tasks?operation=start',
exceptionFnMap: _exceptionFns,
);
return StartSpeakerSearchTaskResponse.fromJson(response);
}