POST
/audio/voice_consentsCreate a voice consent recording
Uploads a voice consent recording for use in authorizing creation of a custom voice. Supply name, recording, and language as multipart form fields, using a supported audio type and a recording no larger than 10 MiB. The response contains the created voice consent identifier and metadata.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
Multipart form data containing the consent recording label, audio file, and BCP 47 language tag.
namestringrequired
The label to use for this consent recording.
recordingstringrequired
The consent audio recording file. Maximum size is 10 MiB.
Supported MIME types:
`audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
languagestringrequired
The BCP 47 language tag for the consent phrase (for example, `en-US`).
200Returns the created voice consent object containing its object type, identifier, name, language, and creation timestamp.
objectstringrequired
The object type, which is always `audio.voice_consent`.
idstringrequired
The consent recording identifier.
namestringrequired
The label provided when the consent recording was uploaded.
languagestringrequired
The BCP 47 language tag for the consent phrase (for example, `en-US`).
created_atintegerrequired
The Unix timestamp (in seconds) for when the consent recording was created.
Error handling
name, recording, and language are required. recording must be no larger than 10 MiB and use one of the supported audio MIME types, while language must be a BCP 47 language tag such as en-US.