Skip to main content
Version: 2.0.0

Create a voice

This endpoint creates a voice and optionally starts training

Training

There are 2 ways to train a voice:

  1. Providing a URL to a dataset when creating the voice

  2. Uploading individual recordings using the recording API

Option 1: Providing a URL to a dataset when creating the voice

  1. Create a voice using the "Create a voice" endpoint and provide a URL to the dataset in the dataset_url attribute. Please see here for acceptable dataset formats.
  2. The dataset will first be analyzed and then training will begin automatically.

Option 2: Uploading individual recordings using the recording API

  1. Create a voice using the "Create a voice" endpoint and omit the dataset_url attribute.
  2. Use the instructions on the "Create a recording" page to upload recordings to your voice.
  3. Upon uploading at least 30 recordings, follow the "Build a voice" documentation to start training.

HTTP Request

POST https://app.resemble.ai/api/v2/voices
JSON Body ParametersTypeDescription
namestringName of the voice
dataset_url(optional) stringA URL to a dataset on which to train the voice on. Please see here for acceptable dataset formats
callback_uri(optional) stringA URL (webhook) that will be notified upon voice training completion Please see here for callback details

HTTP Response

{
"success": true,
"item": {
"uuid": <string>,
"name": <string>,
"status": <string>,
"dataset_url": <string>,
"created_at": <UTC Date>,
"updated_at": <UTC Date>,
}
}

Callback

If you've provided a callback_uri when you created a voice, you will receive the following POST request when the voice has completed training.

{
"id": <string>,
"status": <string>,
"issue": <string>
}
JSON Body ParametersTypeDescription
idstringThe UUID of the voice this callback is for.
statusstringEither "finished" or "dataset_issue".
issuestringIf status is set to "dataset_issue" this field will contain a description of the issue. Otherwise this field will be null.

Examples

NodeJS
1 2 3 4 const Resemble = require('@resemble/node') const resemble = new Resemble('v2', 'YOUR_API_TOKEN') await resemble.voices.create({ name: "Chef", dataset_url: "https://../dataset.zip", callback_uri: "http://example.com/cb" })

Try it out

API Key:
JSON Body: