Skip to main content

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

FieldTypeRequiredNotes
modeltextyesviitor-voice-nar
inputtextyesThe text to speak in the cloned voice
reference_audiofileyesA short clip (a few seconds) of the voice to clone — wav recommended
languagetextnoLanguage 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.