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.
Parameters
Returns
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"
}