Skip to content
Get started

Clone a voice

client.voices.clone(VoiceCloneParams { audio, contentType, language, name } body, RequestOptionsoptions?): VoiceCloneResponse { id, cartesiaVoiceId, createdAt, 2 more }
POST/voices/clone

Clone a voice from an audio recording. Send audio as a base64-encoded string. The cloned voice will be available in GET /voices.

ParametersExpand Collapse
body: VoiceCloneParams { audio, contentType, language, name }
audio: string

Base64-encoded audio data (max ~7.5MB decoded)

maxLength10000000
contentType: "audio/webm" | "audio/wav" | "audio/mpeg" | 3 more

MIME type of the audio

One of the following:
"audio/webm"
"audio/wav"
"audio/mpeg"
"audio/ogg"
"audio/mp4"
"video/webm"
language: "en" | "fr" | "es" | 5 more

Language of the voice

One of the following:
"en"
"fr"
"es"
"de"
"it"
"pt"
"ru"
"zh"
name: string

Name for the cloned voice

minLength1
ReturnsExpand Collapse
VoiceCloneResponse { id, cartesiaVoiceId, createdAt, 2 more }
id: string
cartesiaVoiceId: string
createdAt: string
language: string
name: string

Clone a voice

import Revox from '@revoxai/sdk';

const client = new Revox({
  apiKey: process.env['REVOX_API_KEY'], // This is the default and can be omitted
});

const response = await client.voices.clone({
  audio: 'audio',
  contentType: 'audio/webm',
  language: 'en',
  name: 'x',
});

console.log(response.id);
{
  "id": "id",
  "cartesiaVoiceId": "cartesiaVoiceId",
  "createdAt": "createdAt",
  "language": "language",
  "name": "name"
}
Returns Examples
{
  "id": "id",
  "cartesiaVoiceId": "cartesiaVoiceId",
  "createdAt": "createdAt",
  "language": "language",
  "name": "name"
}