Voice cloning
Voice cloning turns a short reference clip of a voice plus some text into speech spoken in that voice. It's a stateless call — you upload the reference audio with each request, so there's nothing to pre-register.
- Endpoint:
POST /v1/audio/voice-clone - Model:
viitor-voice-nar - Request:
multipart/form-data - Response: an audio stream (the cloned speech)
Request fields
| Field | Type | Required | Notes |
|---|---|---|---|
model | text | yes | viitor-voice-nar |
input | text | yes | The text to speak in the cloned voice |
reference_audio | file | yes | A short clip (a few seconds) of the voice to clone — wav recommended |
language | text | no | Language hint for the output |
Keep the reference clip short and clean — a few seconds of clear speech works best. Uploads are capped at 32 MB.
Example
curl https://api.ecohash.com/v1/audio/voice-clone \
-H "Authorization: Bearer $ECOLINK_API_KEY" \
-F model=viitor-voice-nar \
-F input="Hello — this sentence is spoken in the cloned voice." \
-F language=en \
-F reference_audio=@sample.wav \
--output cloned.wav
The response body is the generated audio. Each response includes an Inference-Id header — a per-request identifier useful for support and debugging.
Billing
Voice cloning is billed as speech synthesis, at the model's speech rate. See Balance & transactions for where usage appears.
Related
- Speech editing — edit words in existing audio while keeping the same voice (same model)
- Text-to-speech — synthesize speech with the platform's standard voices
- Voice-clone & editing API reference