Skip to main content

Speech editing

Speech editing lets you change the words in a piece of audio without re-recording it. You provide the source audio, its original transcript, and an edited transcript; the model finds what changed, regenerates only the affected span, and returns audio that still sounds like the original speaker.

  • Endpoint: POST /v1/audio/text-local-edit
  • Model: viitor-voice-nar
  • Request: multipart/form-data
  • Response: the edited audio stream

How it works

You send two transcripts — the original and the edited version. The model diffs them, so a small wording change regenerates only that portion and splices it back in, preserving the surrounding audio and the voice.

Request fields

FieldTypeRequiredNotes
modeltextyesviitor-voice-nar
source_audiofileyesThe audio to edit (wav recommended)
original_texttextyesTranscript of the source audio, as spoken
edited_texttextyesThe full transcript with your edits applied

Advanced tuning parameters (for example language, output_format, num_steps, cfg_scale) can be supplied as additional form fields and are passed through to the engine. Uploads are capped at 32 MB.

Example

Change "meet at noon" to "meet at five":

curl https://api.ecohash.com/v1/audio/text-local-edit \
-H "Authorization: Bearer $ECOLINK_API_KEY" \
-F model=viitor-voice-nar \
-F source_audio=@original.wav \
-F original_text="Let's meet at noon tomorrow." \
-F edited_text="Let's meet at five tomorrow." \
--output edited.wav

The response body is the edited audio, with an Inference-Id header for the request.

Billing

Speech editing is billed as speech synthesis, at the model's speech rate.