Skip to content

update_voice_profile async

update_voice_profile(
    voice_profile_id: NonEmptyString256,
    speaker_search_task_id: NonEmptyString256,
    *,
    config_overrides: Optional[AsyncChimeSDKVoiceClientConfig] = None,
) -> UpdateVoiceProfileResponse

Updates the specified voice profile’s voice print and refreshes its expiration timestamp.

As a condition of using this feature, you acknowledge that the collection, use, storage, and retention of your caller’s biometric identifiers and biometric information (“biometric data”) in the form of a digital voiceprint requires the caller’s informed consent via a written release. Such consent is required under various state laws, including biometrics laws in Illinois, Texas, Washington and other state privacy laws.

You must provide a written release to each caller through a process that clearly reflects each caller’s informed consent before using Amazon Chime SDK Voice Insights service, as required under the terms of your agreement with AWS governing your use of the service.

Parameters:

Raises:

Source code in docs_src/capo_chime_sdk_voice/_services/async_chime_sdk_voice.py
async def update_voice_profile(
    self,
    voice_profile_id: "capo_chime_sdk_voice.types.non_empty_string256.NonEmptyString256",
    speaker_search_task_id: "capo_chime_sdk_voice.types.non_empty_string256.NonEmptyString256",
    *,
    config_overrides: Optional[AsyncChimeSDKVoiceClientConfig] = None,
) -> "capo_chime_sdk_voice.types.update_voice_profile_response.UpdateVoiceProfileResponse":
    """<p>Updates the specified voice profile’s voice print and refreshes its expiration timestamp.</p> <important> <p>As a condition of using this feature, you acknowledge that the collection, use, storage, and retention of your caller’s biometric identifiers and biometric information (“biometric data”) in the form of a digital voiceprint requires the caller’s informed consent via a written release. Such consent is required under various state laws, including biometrics laws in Illinois, Texas, Washington and other state privacy laws.</p> <p>You must provide a written release to each caller through a process that clearly reflects each caller’s informed consent before using Amazon Chime SDK Voice Insights service, as required under the terms of your agreement with AWS governing your use of the service.</p> </important>

    Args:
        voice_profile_id: <p>The profile ID.</p>
        speaker_search_task_id: <p>The ID of the speaker search task.</p>

    Raises:
        capo_chime_sdk_voice.errors.access_denied_exception.AccessDeniedException: <p>You don't have the permissions needed to run this action.</p>
        capo_chime_sdk_voice.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_voice.errors.conflict_exception.ConflictException: <p>Multiple instances of the same request were made simultaneously.</p>
        capo_chime_sdk_voice.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_voice.errors.gone_exception.GoneException: <p>Access to the target resource is no longer available at the origin server. This condition is likely to be permanent.</p>
        capo_chime_sdk_voice.errors.not_found_exception.NotFoundException: <p>The requested resource couldn't be found.</p>
        capo_chime_sdk_voice.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_voice.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_voice.errors.throttled_client_exception.ThrottledClientException: <p>The number of customer requests exceeds the request rate limit.</p>
        capo_chime_sdk_voice.errors.unauthorized_client_exception.UnauthorizedClientException: <p>The client isn't authorized to request a resource.</p>
        capo_chime_sdk_voice.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chime_sdk_voice.types.update_voice_profile_request.UpdateVoiceProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_chime_sdk_voice.types.update_voice_profile_response.UpdateVoiceProfileResponse"
    ]:
        import capo_chime_sdk_voice._operations.chime_sdk_telephony_service.update_voice_profile

        (
            output,
            http_response,
        ) = await capo_chime_sdk_voice._operations.chime_sdk_telephony_service.update_voice_profile.async_update_voice_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_chime_sdk_voice.types.update_voice_profile_response.UpdateVoiceProfileResponse",
    ) -> dict[str, Any]:
        import capo_chime_sdk_voice.types.update_voice_profile_response

        return capo_chime_sdk_voice.types.update_voice_profile_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateVoiceProfile", redact_output=_redact_output),
    )
    input_: capo_chime_sdk_voice.types.update_voice_profile_request.UpdateVoiceProfileRequest = {
        "voice_profile_id": voice_profile_id,
        "speaker_search_task_id": speaker_search_task_id,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output