Skip to content

Custom voices

The Voices API lets you create custom voices for your Characters. Design an entirely new voice from a text prompt, or clone a voice from an audio sample. Once created, assign the voice to any Avatar.

Create a voice by describing the characteristics you want. The prompt should include details like tone, accent, pacing, and personality.

import RunwayML from '@runwayml/sdk';
const client = new RunwayML();
const voice = await client.voices.create({
name: 'Brand Ambassador',
from: {
type: 'text',
prompt: 'A warm, friendly voice with a slight British accent. Speaks at a measured pace with a professional yet approachable tone.',
model: 'eleven_ttv_v3',
},
});
console.log('Voice created:', voice.id);
ParameterTypeDescription
namestringA name for the voice (max 100 characters).
from.type"text"Indicates voice design from a text prompt.
from.promptstringA description of the desired voice characteristics. Must be at least 20 characters.
from.modelstringThe voice design model. Use eleven_ttv_v3 (latest) or eleven_multilingual_ttv_v2.

Clone a voice from an audio sample. Provide a clear recording with minimal background noise and varied tone for best results.

const voice = await client.voices.create({
name: 'Cloned Narrator',
from: {
type: 'audio',
audio: 'https://example.com/voice-sample.mp3',
},
});
console.log('Voice created:', voice.id);

The audio sample must be between 10 seconds and 5 minutes long, and at most 10 MB. You can pass a public HTTPS URL, a runway:// upload URI, or a data:audio/... data URI.

Voice creation is asynchronous. After calling create, poll the voice until its status is READY.

const voice = await client.voices.retrieve(voiceId);
if (voice.status === 'READY') {
console.log('Preview:', voice.previewUrl);
}
StatusDescription
PROCESSINGVoice is being generated. Poll until ready.
READYVoice is ready. A previewUrl is available.
FAILEDGeneration failed. Check failureReason.

Once the voice is ready, assign it to an Avatar by setting the voice type to custom and providing the voice ID.

await client.avatars.update(avatarId, {
voice: {
type: 'custom',
id: voice.id,
},
});

You can also create a new Avatar with a custom voice directly:

const avatar = await client.avatars.create({
name: 'Support Agent',
referenceImage: 'https://example.com/avatar.png',
voice: {
type: 'custom',
id: voice.id,
},
personality: 'You are a helpful customer support agent...',
});

Retrieve all custom voices for your organization.

const voices = await client.voices.list();
for await (const voice of voices) {
console.log(voice.name, voice.status);
}

You can also manage custom voices through the Developer Portal. See the API reference for all available endpoints.