<a id="cli-aws-polly-create-voice"></a>

# create-voice

## Description

Creates a custom voice from recordings of a speaker and returns it in `pending` status. Use `GetVoice` to check the status. When the status is `active` , you can use the voice ID in `SynthesizeSpeech` , `StartSpeechSynthesisTask` , and `StartSpeechSynthesisStream` .

The `custom-voice-max-count` service quota limits the number of custom voices in your account in each Region. If you reach the quota, the request fails with `ServiceQuotaExceededException` .

This operation requires permissions to perform the `polly:CreateVoice` action. You also need `s3:GetObject` permission on each recording that you specify by `S3Url` . If you specify a customer managed key, you also need `kms:DescribeKey` , `kms:GenerateDataKey` , and `kms:Decrypt` permissions on the key. If you specify `Tags` , you also need the `polly:TagResource` permission.

See also: [AWS API Documentation](https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/CreateVoice)

## Synopsis

```
  create-voice
--name <value>
--language-code <value>
--terms-accepted | --no-terms-accepted
--voice-creation-data <value>
[--customer-managed-encryption <value>]
[--tags <value>]
[--client-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
```

## Options

`--name` (string) [required]

> The name of the voice. Use the name to identify the voice in your application. The name can contain letters, digits, hyphens, and underscores, and can be up to 64 characters long. The name doesn’t have to be unique. The name isn’t the voice ID, which Amazon Polly assigns.

> Constraints:

> * min: `1`
> * max: `64`
> * pattern: `^[a-zA-Z0-9_-]+$`

`--language-code` (string) [required]

> The language of the recordings, for example, `en-US` . Amazon Polly doesn’t detect the language from the recordings.

> Possible values:

> * `de-DE`
> * `en-US`
> * `es-US`
> * `fr-FR`
> * `hi-IN`
> * `it-IT`
> * `pt-BR`

`--terms-accepted` | `--no-terms-accepted` (boolean) [required]

> Confirms the following two statements:

> * “I confirm that I have obtained all necessary consents required under any applicable laws and regulations, including biometric privacy laws, from the owner of this voice to clone these voice samples.”
> * “I confirm that I will not use the generated content for any illegal, fraudulent, or harmful purpose and reaffirm my obligation to abide by the AWS Service Terms, Biometric Notice and Consent Terms, AWS Responsible AI Policy, and AWS Acceptable Use Policy.”

> You can read the [AWS Service Terms](https://aws.amazon.com/service-terms/) , the [Biometric Notice and Consent Terms](https://aws.amazon.com/legal/biometric-notice-and-consent-terms/) , the [AWS Responsible AI Policy](https://aws.amazon.com/ai/responsible-ai/policy/) , and the [AWS Acceptable Use Policy](https://aws.amazon.com/aup/) on the Amazon Web Services website.

> You must set this parameter to `true` to create a voice. Otherwise, the request fails with `ValidationException` .

`--voice-creation-data` (structure) [required]

> The recordings that Amazon Polly uses to create the voice.

> Recordings -> (list) [required]

> > The recordings of the speaker. Each recording specifies its audio format and its audio source.

> > Constraints:

> > * min: `1`
> > * max: `10`

> > (structure)

> > > A recording of the speaker whose voice you want to create. The recording specifies its audio format and its audio source.

> > > Format -> (string) [required]

> > > > The audio format of the recording: `wav` , `flac` , `ogg_vorbis` , or `mp3` . The format must match the audio data.

> > > > Possible values:

> > > > * `wav`
> > > > * `flac`
> > > > * `ogg_vorbis`
> > > > * `mp3`

> > > Data -> (structure) [required]

> > > > The audio source of the recording. Specify either an Amazon S3 object or the audio data.

> > > > S3Url -> (string)

> > > > > The Amazon S3 URL of the audio object, in the form `s3://bucket/key` . You need `s3:GetObject` permission on the object.

> > > > > Constraints:

> > > > > * max: `1024`
> > > > > * pattern: `^s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9]/.+$`

> > > > Bytes -> (blob)

> > > > > The audio data, passed directly in the request. The data must be in the format that `Format` specifies and can be up to 5 MB. Amazon Polly doesn’t store the audio after it creates the voice, and doesn’t return this field in responses.

> > > > > Constraints:

> > > > > * max: `5242880`

JSON Syntax:

```json
{
  "Recordings": [
    {
      "Format": "wav"|"flac"|"ogg_vorbis"|"mp3",
      "Data": {
        "S3Url": "string",
        "Bytes": blob
      }
    }
    ...
  ]
}
```

`--customer-managed-encryption` (structure)

> The customer managed key that you want Amazon Polly to encrypt the voice with. If you omit this parameter, Amazon Polly encrypts the voice with an Amazon Web Services owned key.

> KmsKeyArn -> (string) [required]

> > The Amazon Resource Name (ARN) of the key. The key must be a symmetric encryption key in the same Amazon Web Services Region as the voice. To create the voice, you need `kms:DescribeKey` , `kms:GenerateDataKey` , and `kms:Decrypt` permissions on the key. To synthesize speech with the voice, you need `kms:Decrypt` permission on the key.

> > Constraints:

> > * min: `20`
> > * max: `2048`
> > * pattern: `^arn:aws(-(cn|iso(-b)?|us-gov|eusc))?:kms:[a-z0-9_-]{1,50}:\d{12}:key/[a-zA-Z0-9-]+$`

> EncryptionContext -> (map)

> > The key-value pairs that Amazon Polly includes as the encryption context when it encrypts or decrypts the voice with the key. You can use these pairs in key policy conditions. Don’t use keys that start with `aws:` , which are reserved.

> > Constraints:

> > * max: `10`

> > key -> (string)

> > > Constraints:

> > > * min: `1`
> > > * max: `128`

> > value -> (string)

> > > Constraints:

> > > * min: `1`
> > > * max: `256`

Shorthand Syntax:

```
KmsKeyArn=string,EncryptionContext={KeyName1=string,KeyName2=string}
```

JSON Syntax:

```json
{
  "KmsKeyArn": "string",
  "EncryptionContext": {"string": "string"
    ...}
}
```

`--tags` (map)

> The tags that you apply to the voice to help you categorize and organize it. Each tag consists of a key and an optional value, both of which you define.

> Constraints:

> * min: `1`
> * max: `200`

> key -> (string)

> > Constraints:

> > * min: `1`
> > * max: `128`

> value -> (string)

> > Constraints:

> > * min: `0`
> > * max: `256`

Shorthand Syntax:

```
KeyName1=string,KeyName2=string
```

JSON Syntax:

```json
{"string": "string"
  ...}
```

`--client-token` (string)

> A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDKs generate one for you. If you retry a request that succeeded with the same client token and the same parameters, Amazon Polly returns the voice that the first request created and doesn’t create a second voice.

> Constraints:

> * min: `1`
> * max: `64`
> * pattern: `^[!-~]+$`

`--cli-input-json` | `--cli-input-yaml` (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by `--generate-cli-skeleton`. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with `--cli-input-yaml`.

`--generate-cli-skeleton` (string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value `input`, prints a sample input JSON that can be used as an argument for `--cli-input-json`. Similarly, if provided `yaml-input` it will print a sample input YAML that can be used with `--cli-input-yaml`. If provided with the value `output`, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

## Global Options

`--debug` (boolean)

Turn on debug logging.

`--endpoint-url` (string)

Override command’s default URL with the given URL.

`--no-verify-ssl` (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

`--no-paginate` (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

`--output` (string)

The formatting style for command output.

* json
* text
* table
* yaml
* yaml-stream
* off

`--query` (string)

A JMESPath query to use in filtering the response data.

`--profile` (string)

Use a specific profile from your credential file.

`--region` (string)

The region to use. Overrides config/env settings.

`--version` (string)

Display the version of this tool.

`--color` (string)

Turn on/off color output.

* on
* off
* auto

`--no-sign-request` (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

`--ca-bundle` (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

`--cli-read-timeout` (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

`--cli-connect-timeout` (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

`--cli-binary-format` (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob `fileb://` will always be treated as binary and use the file contents directly regardless of the `cli-binary-format` setting. When using `file://` the file contents will need to properly formatted for the configured `cli-binary-format`.

* base64
* raw-in-base64-out

`--no-cli-pager` (boolean)

Disable cli pager for output.

`--cli-auto-prompt` (boolean)

Automatically prompt for CLI input parameters.

`--no-cli-auto-prompt` (boolean)

Disable automatically prompt for CLI input parameters.

`--cli-error-format` (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

* legacy
* json
* yaml
* text
* table
* enhanced

`--help` (boolean)

Display help for the command/subcommand.

## Output

Voice -> (structure)

> The new voice, in `pending` status.

> Arn -> (string)

> > The Amazon Resource Name (ARN) of a custom voice, in the form `arn:partition:polly:region:account-id:voice/voice-id` . `CreateVoice` and `GetVoice` return this field. Voices that Amazon Polly provides don’t have an ARN.

> > Constraints:

> > * pattern: `^arn:aws(-(cn|iso(-b)?|us-gov|eusc))?:polly:[a-z0-9_-]{1,50}:\d{12}:voice/[a-zA-Z0-9_-]+$`

> Gender -> (string)

> > The gender of the voice. Custom voices don’t include this field.

> > Possible values:

> > * `Female`
> > * `Male`

> Id -> (string)

> > The voice ID that Amazon Polly assigns. You specify this ID when you call the `SynthesizeSpeech` operation. For a custom voice, Amazon Polly assigns an ID that consists of `vc-` followed by hexadecimal characters, for example, `vc-9a8fa85dd3` .

> > Possible values:

> > * `Aditi`
> > * `Amy`
> > * `Astrid`
> > * `Bianca`
> > * `Brian`
> > * `Camila`
> > * `Carla`
> > * `Carmen`
> > * `Celine`
> > * `Chantal`
> > * `Conchita`
> > * `Cristiano`
> > * `Dora`
> > * `Emma`
> > * `Enrique`
> > * `Ewa`
> > * `Filiz`
> > * `Gabrielle`
> > * `Geraint`
> > * `Giorgio`
> > * `Gwyneth`
> > * `Hans`
> > * `Ines`
> > * `Ivy`
> > * `Jacek`
> > * `Jan`
> > * `Joanna`
> > * `Joey`
> > * `Justin`
> > * `Karl`
> > * `Kendra`
> > * `Kevin`
> > * `Kimberly`
> > * `Lea`
> > * `Liv`
> > * `Lotte`
> > * `Lucia`
> > * `Lupe`
> > * `Mads`
> > * `Maja`
> > * `Marlene`
> > * `Mathieu`
> > * `Matthew`
> > * `Maxim`
> > * `Mia`
> > * `Miguel`
> > * `Mizuki`
> > * `Naja`
> > * `Nicole`
> > * `Olivia`
> > * `Penelope`
> > * `Raveena`
> > * `Ricardo`
> > * `Ruben`
> > * `Russell`
> > * `Salli`
> > * `Seoyeon`
> > * `Takumi`
> > * `Tatyana`
> > * `Vicki`
> > * `Vitoria`
> > * `Zeina`
> > * `Zhiyu`
> > * `Aria`
> > * `Ayanda`
> > * `Arlet`
> > * `Hannah`
> > * `Arthur`
> > * `Daniel`
> > * `Liam`
> > * `Pedro`
> > * `Kajal`
> > * `Hiujin`
> > * `Laura`
> > * `Elin`
> > * `Ida`
> > * `Suvi`
> > * `Ola`
> > * `Hala`
> > * `Andres`
> > * `Sergio`
> > * `Remi`
> > * `Adriano`
> > * `Thiago`
> > * `Ruth`
> > * `Stephen`
> > * `Kazuha`
> > * `Tomoko`
> > * `Niamh`
> > * `Sofie`
> > * `Lisa`
> > * `Isabelle`
> > * `Zayd`
> > * `Danielle`
> > * `Gregory`
> > * `Burcu`
> > * `Jitka`
> > * `Sabrina`
> > * `Jasmine`
> > * `Jihye`
> > * `Ambre`
> > * `Beatrice`
> > * `Florian`
> > * `Lennart`
> > * `Lorenzo`
> > * `Tiffany`
> > * `Arjun`
> > * `Carlos`
> > * `Carolina`
> > * `Curtis`
> > * `Hyunduk`
> > * `Kenneth`
> > * `Kiara`
> > * `Leo`
> > * `Nate`
> > * `Tina`

> LanguageCode -> (string)

> > Language code of the voice.

> > Possible values:

> > * `arb`
> > * `cmn-CN`
> > * `cy-GB`
> > * `da-DK`
> > * `de-DE`
> > * `en-AU`
> > * `en-GB`
> > * `en-GB-WLS`
> > * `en-IN`
> > * `en-US`
> > * `es-ES`
> > * `es-MX`
> > * `es-US`
> > * `fr-CA`
> > * `fr-FR`
> > * `is-IS`
> > * `it-IT`
> > * `ja-JP`
> > * `hi-IN`
> > * `ko-KR`
> > * `nb-NO`
> > * `nl-NL`
> > * `pl-PL`
> > * `pt-BR`
> > * `pt-PT`
> > * `ro-RO`
> > * `ru-RU`
> > * `sv-SE`
> > * `tr-TR`
> > * `en-NZ`
> > * `en-ZA`
> > * `ca-ES`
> > * `de-AT`
> > * `yue-CN`
> > * `ar-AE`
> > * `fi-FI`
> > * `en-IE`
> > * `nl-BE`
> > * `fr-BE`
> > * `cs-CZ`
> > * `de-CH`
> > * `en-SG`

> LanguageName -> (string)

> > Human readable name of the language in English.

> Name -> (string)

> > The name of the voice, for example, Salli or Kendra. The name is human-readable, and you might display it in your application. For a custom voice, this is the `Name` that you specified in `CreateVoice` .

> Origin -> (string)

> > Indicates who provides the voice. The origin is one of the following:

> > > aws

> > A voice that Amazon Polly provides.

> > > customer

> > A custom voice that you created with `CreateVoice` .

> > Possible values:

> > * `aws`
> > * `customer`

> Status -> (string)

> > The status of a custom voice. Voices that Amazon Polly provides don’t include this field. The status is one of the following:

> > > pending

> > Amazon Polly is creating the voice.

> > > active

> > The voice is ready for speech synthesis.

> > > failed

> > Amazon Polly couldn’t create the voice. `StatusReason` describes why.

> > Possible values:

> > * `pending`
> > * `active`
> > * `failed`

> StatusReason -> (string)

> > Additional information about the status of a custom voice. When the status is `failed` , this field describes why Amazon Polly couldn’t create the voice.

> AdditionalLanguageCodes -> (list)

> > Additional codes for languages available for the specified voice in addition to its default language.

> > For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code `hi-IN` .

> > (string)

> > > Possible values:

> > > * `arb`
> > > * `cmn-CN`
> > > * `cy-GB`
> > > * `da-DK`
> > > * `de-DE`
> > > * `en-AU`
> > > * `en-GB`
> > > * `en-GB-WLS`
> > > * `en-IN`
> > > * `en-US`
> > > * `es-ES`
> > > * `es-MX`
> > > * `es-US`
> > > * `fr-CA`
> > > * `fr-FR`
> > > * `is-IS`
> > > * `it-IT`
> > > * `ja-JP`
> > > * `hi-IN`
> > > * `ko-KR`
> > > * `nb-NO`
> > > * `nl-NL`
> > > * `pl-PL`
> > > * `pt-BR`
> > > * `pt-PT`
> > > * `ro-RO`
> > > * `ru-RU`
> > > * `sv-SE`
> > > * `tr-TR`
> > > * `en-NZ`
> > > * `en-ZA`
> > > * `ca-ES`
> > > * `de-AT`
> > > * `yue-CN`
> > > * `ar-AE`
> > > * `fi-FI`
> > > * `en-IE`
> > > * `nl-BE`
> > > * `fr-BE`
> > > * `cs-CZ`
> > > * `de-CH`
> > > * `en-SG`

> SupportedEngines -> (list)

> > Specifies which engines (`standard` , `neural` , `long-form` or `generative` ) are supported by a given voice.

> > (string)

> > > Possible values:

> > > * `standard`
> > > * `neural`
> > > * `long-form`
> > > * `generative`

> VoiceCreationData -> (structure)

> > The data from which you created the custom voice. `CreateVoice` and `GetVoice` return this field. The response doesn’t include the audio: a recording that Amazon Polly read from Amazon S3 includes its `S3Url` , and a recording that you passed as `Bytes` has no fields in `Data` .

> > Recordings -> (list) [required]

> > > The recordings of the speaker. Each recording specifies its audio format and its audio source.

> > > Constraints:

> > > * min: `1`
> > > * max: `10`

> > > (structure)

> > > > A recording of the speaker whose voice you want to create. The recording specifies its audio format and its audio source.

> > > > Format -> (string) [required]

> > > > > The audio format of the recording: `wav` , `flac` , `ogg_vorbis` , or `mp3` . The format must match the audio data.

> > > > > Possible values:

> > > > > * `wav`
> > > > > * `flac`
> > > > > * `ogg_vorbis`
> > > > > * `mp3`

> > > > Data -> (structure) [required]

> > > > > The audio source of the recording. Specify either an Amazon S3 object or the audio data.

> > > > > S3Url -> (string)

> > > > > > The Amazon S3 URL of the audio object, in the form `s3://bucket/key` . You need `s3:GetObject` permission on the object.

> > > > > > Constraints:

> > > > > > * max: `1024`
> > > > > > * pattern: `^s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9]/.+$`

> > > > > Bytes -> (blob)

> > > > > > The audio data, passed directly in the request. The data must be in the format that `Format` specifies and can be up to 5 MB. Amazon Polly doesn’t store the audio after it creates the voice, and doesn’t return this field in responses.

> > > > > > Constraints:

> > > > > > * max: `5242880`

> CustomerManagedEncryption -> (structure)

> > The customer managed key that encrypts your custom voice. `CreateVoice` and `GetVoice` return this field if you specified a key in `CreateVoice` .

> > KmsKeyArn -> (string) [required]

> > > The Amazon Resource Name (ARN) of the key. The key must be a symmetric encryption key in the same Amazon Web Services Region as the voice. To create the voice, you need `kms:DescribeKey` , `kms:GenerateDataKey` , and `kms:Decrypt` permissions on the key. To synthesize speech with the voice, you need `kms:Decrypt` permission on the key.

> > > Constraints:

> > > * min: `20`
> > > * max: `2048`
> > > * pattern: `^arn:aws(-(cn|iso(-b)?|us-gov|eusc))?:kms:[a-z0-9_-]{1,50}:\d{12}:key/[a-zA-Z0-9-]+$`

> > EncryptionContext -> (map)

> > > The key-value pairs that Amazon Polly includes as the encryption context when it encrypts or decrypts the voice with the key. You can use these pairs in key policy conditions. Don’t use keys that start with `aws:` , which are reserved.

> > > Constraints:

> > > * max: `10`

> > > key -> (string)

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `128`

> > > value -> (string)

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `256`

> CreationTime -> (timestamp)

> > The date and time when you created the custom voice. Voices that Amazon Polly provides don’t include this field.
