:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / send_voice_message

******************
send_voice_message
******************



.. py:method:: PinpointSMSVoiceV2.Client.send_voice_message(**kwargs)

  

  Allows you to send a request that sends a voice message. This operation uses `Amazon Polly <http://aws.amazon.com/polly/>`__ to convert a text script into a voice message.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/SendVoiceMessage>`_  


  **Request Syntax**
  ::

    response = client.send_voice_message(
        DestinationPhoneNumber='string',
        OriginationIdentity='string',
        MessageBody='string',
        MessageBodyTextType='TEXT'|'SSML',
        VoiceId='AMY'|'ASTRID'|'BIANCA'|'BRIAN'|'CAMILA'|'CARLA'|'CARMEN'|'CELINE'|'CHANTAL'|'CONCHITA'|'CRISTIANO'|'DORA'|'EMMA'|'ENRIQUE'|'EWA'|'FILIZ'|'GERAINT'|'GIORGIO'|'GWYNETH'|'HANS'|'INES'|'IVY'|'JACEK'|'JAN'|'JOANNA'|'JOEY'|'JUSTIN'|'KARL'|'KENDRA'|'KIMBERLY'|'LEA'|'LIV'|'LOTTE'|'LUCIA'|'LUPE'|'MADS'|'MAJA'|'MARLENE'|'MATHIEU'|'MATTHEW'|'MAXIM'|'MIA'|'MIGUEL'|'MIZUKI'|'NAJA'|'NICOLE'|'PENELOPE'|'RAVEENA'|'RICARDO'|'RUBEN'|'RUSSELL'|'SALLI'|'SEOYEON'|'TAKUMI'|'TATYANA'|'VICKI'|'VITORIA'|'ZEINA'|'ZHIYU',
        ConfigurationSetName='string',
        MaxPricePerMinute='string',
        TimeToLive=123,
        Context={
            'string': 'string'
        },
        DryRun=True|False,
        ProtectConfigurationId='string',
        MessageFeedbackEnabled=True|False
    )
    
  :type DestinationPhoneNumber: string
  :param DestinationPhoneNumber: **[REQUIRED]** 

    The destination phone number in E.164 format.

    

  
  :type OriginationIdentity: string
  :param OriginationIdentity: **[REQUIRED]** 

    The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.

     

    .. warning::

       

      If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).

      

    

  
  :type MessageBody: string
  :param MessageBody: 

    The text to convert to a voice message.

    

  
  :type MessageBodyTextType: string
  :param MessageBodyTextType: 

    Specifies if the MessageBody field contains text or `speech synthesis markup language (SSML) <https://docs.aws.amazon.com/polly/latest/dg/what-is.html>`__.

     

    
    * TEXT: This is the default value. When used the maximum character limit is 3000.
     
    * SSML: When used the maximum character limit is 6000 including SSML tagging.
    

    

  
  :type VoiceId: string
  :param VoiceId: 

    The voice for the `Amazon Polly <https://docs.aws.amazon.com/polly/latest/dg/what-is.html>`__ service to use. By default this is set to "MATTHEW".

    

  
  :type ConfigurationSetName: string
  :param ConfigurationSetName: 

    The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.

    

  
  :type MaxPricePerMinute: string
  :param MaxPricePerMinute: 

    The maximum amount to spend per voice message, in US dollars.

    

  
  :type TimeToLive: integer
  :param TimeToLive: 

    How long the voice message is valid for. By default this is 72 hours.

    

  
  :type Context: dict
  :param Context: 

    You can specify custom data in this field. If you do, that data is logged to the event destination.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type DryRun: boolean
  :param DryRun: 

    When set to true, the message is checked and validated, but isn't sent to the end recipient.

    

  
  :type ProtectConfigurationId: string
  :param ProtectConfigurationId: 

    The unique identifier for the protect configuration.

    

  
  :type MessageFeedbackEnabled: boolean
  :param MessageFeedbackEnabled: 

    Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using  PutMessageFeedback.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'MessageId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **MessageId** *(string) --* 

        The unique identifier for the message.

        
  
  **Exceptions**
  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ValidationException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ConflictException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.InternalServerException`

  