Elevenlabs Voice Changer API Documentation
Playground
Try it on WaveSpeedAI!ElevenLabs Voice Changer transforms any audio into speech with a different voice while preserving the original speech patterns and timing. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
Features
ElevenLabs Voice Changer transforms any audio into speech with a different voice. Upload your audio and select a target voice — the model converts the speech while preserving the original timing, emotion, and delivery. Built on ElevenLabs’ industry-leading voice AI with best-in-class quality.
REST inference API, best performance, no cold starts, affordable pricing.
Why Choose This?
-
High-quality voice conversion Industry-leading voice transformation that maintains natural speech patterns and emotional delivery.
-
Multiple voice options Choose from a variety of pre-built voices to match your content needs (see the voice list).
-
Background noise removal Optional noise reduction to clean up audio before conversion.
-
Fast processing Optimized for quick turnaround with no cold starts.
-
Production-ready API Reliable REST endpoint with predictable per-minute pricing.
Parameters
| Parameter | Required | Description |
|---|---|---|
| audio | Yes | Source audio file to transform (upload or URL) |
| voice_id | No | Target voice for conversion (default: Alicia) |
| remove_background_noise | No | Remove background noise from the audio |
How to Use
- Upload your audio — drag and drop, paste a URL, or record directly.
- Select voice — choose the target voice for conversion.
- Enable noise removal (optional) — check to clean up background noise.
- Run — submit and download the converted audio.
Pricing
$0.004 per second of input audio, rounded up to the next whole second.
| Duration | Cost |
|---|---|
| 5 seconds | $0.02 |
| 30 seconds | $0.12 |
| 1 minute | $0.24 |
| 5 minutes | $1.20 |
Billing Rules
- Billed by the duration of the input
audio, rounded up to the next second - Maximum billed duration is 5 minutes, matching the per-request limit
voice_idandremove_background_noisedo not affect pricing
Best Use Cases
- Content Creation — Change voices for podcasts, videos, or audiobooks.
- Dubbing — Convert speech to different voices for localization.
- Privacy — Anonymize voice recordings while preserving content.
- Character Voices — Create distinct character voices for storytelling.
- Accessibility — Convert speech to preferred voice styles.
Pro Tips
- Use clean, high-quality source audio for best results.
- Enable background noise removal if your source has ambient sounds.
- Shorter clips process faster — split long audio for parallel processing.
- Test with different voices to find the best match for your content.
Notes
- Maximum audio duration is 5 minutes per job; longer audio is automatically trimmed to the first 5 minutes.
- For longer content, split into segments and process separately.
- Supported audio formats include MP3, WAV, and other common formats.
Related Models
- ElevenLabs V3 — Generate speech from text with natural-sounding voices.
- OpenAI Whisper — Transcribe audio to text with high accuracy.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"audio": "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3",
"voice_id": "Alicia",
"remove_background_noise": false
}
JSON
)
# 1. Submit the prediction once. Never retry this request automatically:
# a retry after an unclear failure can create a second, billed task.
CHECK='The task may already exist. Check History or the predictions list before submitting again.'
if ! SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 60 \
-X POST "https://api.wavespeed.ai/api/v3/elevenlabs/voice-changer" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}"); then
printf 'Submit failed. %s\n' "${CHECK}" >&2
exit 1
fi
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id. %s\n' "${CHECK}" >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction reaches a final status.
BODY_FILE=$(mktemp)
trap 'rm -f "${BODY_FILE}"' EXIT
while true; do
# Transient errors (429, 5xx) are retried, honoring Retry-After.
HTTP_CODE=$(curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 60 --retry 5 --retry-delay 2 \
--output "${BODY_FILE}" --write-out '%{http_code}' \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" || true)
case "${HTTP_CODE}" in
2??) ;;
000|429|5??) # dropped connection or temporary error: keep polling
printf 'Task %s: HTTP %s, polling again in 10s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
sleep 10; continue ;;
*) printf 'Task %s: HTTP %s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
cat "${BODY_FILE}" >&2; exit 1 ;;
esac
RESULT=$(jq 'if type == "object" and has("data") then .data else . end' "${BODY_FILE}")
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted)
printf 'Task %s ended with status %s\n' "${PREDICTION_ID}" "${STATUS}" >&2
printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneRetry temporary errors only while polling, never the submit request. Errors, retries and timeouts
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| audio | string | Yes | - | - | URL of the audio file to transform |
| voice_id | string | No | Alicia | Adam, Alice, Alicia, Aria, Baxter, Bella, Bill, Brian, Caleb, Callum, Charlie, Charlotte, Chris, Daniel, Darian, Eddie, Elara, Eldrin, Elowen, Eric, Finley, Florence, George, Harry, Jade, Jessica, Kaelen, Laura, Lawrence, Liam, Lily, Maisie, Matilda, River, Roger, Sarah, Sawyer, Talia, Warren, Will, Wyatt | Voice to apply to the audio. Choose one of the preset voice names. |
| remove_background_noise | boolean | No | false | - | Remove background noise from the audio |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |