Voice

Create new voice from audio/video file sample

Description

Endpoint allows users to clone voices from audio or video samples. Uploading process is similar to the Blob API.

Notice, for now samples count for voice cloning is limited to 1 sample.

Files submission occurs in several requests:

  1. Client sends a POST request to the endpoint with a list of files to upload. Server verify the request and generates a pre-signed URL for each submitted file.
  2. Client sends a POST request to each pre-signed URL with the file to upload.
  3. Optional: Client might request 'GET /saas/voice/m/voice_id' to receive processing status.

Examples

cURL

1. Submitting a list of voice data to create voice records.

curl -X 'POST' \
  'https://api.palabra.ai/saas/voice/clone' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <JWT_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
  "data": {
    "name": "Awesome voice name",
    "samples": [
      {
        "filename": "mysample.pm3",
        "mime_type": "audio/x-wav",
        "display_name": "mysample",
        "description": "My voice sample",
        "denoise": false,
        "speech_normalization": false,
        "lang_code": "en"
      }
    ],
    "description": "My awesome voice",
    "labels": {
      "gender": "Male",
      "age_group": "Young",
      "mood": "Neutral"
    }
  }
}'

2. Submitting files

Endpoint respond with a JSON array object containing url and form_data keys for each submitted file. In the following example, we're use cURL command making a POST FormData request to upload a file:

curl -X POST \
-F 'key=bl...0f' \
-F 'x-amz-algorithm=AWS4-HMAC-SHA256' \
... Other form data fields from the response...
-F 'policy=eyJleHBpc...zA3WiJ9XX0=' \
-F 'x-amz-signature=463f78071...847af0c' \
-F file=@<file path at your file system> \
https://url.from.the/response/

References

post/saas/voice/clone

Request body

Response

Successful Response

okboolean

Indicates if the request was successful or not.

Changes

No recorded changes to this endpoint across all 1 revision of this API.