packages/cloud-frontend/content/voice-cloning.mdx
import { Callout, Steps, Tabs, Cards } from "@/docs/components";
Create custom AI voices and generate speech with ElevenLabs integration.
<div className="status-badge status-beta">Beta</div>Voice cloning on elizaOS Cloud enables you to:
Navigate to Dashboard → Voices for the visual interface.
<Tabs items={['Clone Voice', 'Generate Speech', 'List Voices']}> <Tabs.Tab>
# Clone a voice from audio samples
curl -X POST "https://elizacloud.ai/api/elevenlabs/voices/clone" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "name=My Voice Clone" \
-F "[email protected]" \
-F "[email protected]"
</Tabs.Tab> <Tabs.Tab>
# Generate speech
curl -X POST "https://elizacloud.ai/api/elevenlabs/tts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, this is a test of voice synthesis.",
"voice_id": "voice_abc123",
"model_id": "eleven_multilingual_v2"
}' \
--output speech.mp3
</Tabs.Tab> <Tabs.Tab>
# List your voices
curl -X GET "https://elizacloud.ai/api/elevenlabs/voices/user" \
-H "Authorization: Bearer YOUR_API_KEY"
</Tabs.Tab> </Tabs>
Requirements:
Upload audio files via dashboard or API.
Submit the cloning request and wait for processing.
Test the cloned voice with sample text.
</Steps>| Requirement | Recommendation |
|---|---|
| Duration | 1-3 minutes total |
| Format | WAV, MP3, M4A |
| Quality | 44.1kHz, 16-bit minimum |
| Content | Natural speech, varied intonation |
| Noise | Minimal background noise |
const response = await fetch("https://elizacloud.ai/api/elevenlabs/tts", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Welcome to elizaOS Cloud!",
voice_id: "voice_abc123",
model_id: "eleven_multilingual_v2",
voice_settings: {
stability: 0.5,
similarity_boost: 0.75,
},
}),
});
const audioBlob = await response.blob();
const audioUrl = URL.createObjectURL(audioBlob);
| Setting | Range | Description |
|---|---|---|
stability | 0-1 | Higher = more consistent, lower = more expressive |
similarity_boost | 0-1 | How closely to match the original voice |
style | 0-1 | Style exaggeration (v2 models only) |
use_speaker_boost | bool | Enhance speaker similarity |
| Model | Languages | Quality | Speed |
|---|---|---|---|
eleven_multilingual_v2 | 29 | Highest | Medium |
eleven_monolingual_v1 | English | High | Fast |
eleven_turbo_v2 | English | Good | Fastest |
elizaOS Cloud provides pre-built voices:
curl -X GET "https://elizacloud.ai/api/elevenlabs/voices" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"voices": [
{
"voice_id": "21m00Tcm4TlvDq8ikWAM",
"name": "Rachel",
"labels": { "accent": "american", "age": "young" },
"preview_url": "https://..."
},
{
"voice_id": "AZnzlk1XvdvUeBnXmlld",
"name": "Domi",
"labels": { "accent": "american", "age": "young" }
}
]
}
curl -X GET "https://elizacloud.ai/api/elevenlabs/voices/voice_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X DELETE "https://elizacloud.ai/api/elevenlabs/voices/voice_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://elizacloud.ai/api/elevenlabs/voices/jobs" \
-H "Authorization: Bearer YOUR_API_KEY"
Use cloned voices with your agents:
{
"name": "Voice Assistant",
"bio": ["Helpful AI assistant with custom voice"],
"settings": {
"voice": {
"provider": "elevenlabs",
"voiceId": "voice_abc123",
"model": "eleven_multilingual_v2"
}
}
}
Convert audio to text:
curl -X POST "https://elizacloud.ai/api/elevenlabs/stt" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]"
{
"text": "This is the transcribed text from the audio.",
"confidence": 0.95,
"words": [
{ "word": "This", "start": 0.0, "end": 0.2, "confidence": 0.98 },
{ "word": "is", "start": 0.2, "end": 0.3, "confidence": 0.99 }
]
}
See Billing & Credits and the dashboard/API Explorer for current voice pricing. Voice cloning and TTS/STT billing can vary by provider configuration.
<Callout type="info"> Monitor your voice usage in the [billing dashboard](/dashboard/billing). </Callout>