Nodes/TTS Audio Suite/๐Ÿ‘„ F5-TTS Speech Editor
ComfyUI Node

๐Ÿ‘„ F5-TTS Speech Editor

Fix one word without regenerating the whole clip

By diodiogodยทCreated 12 months agoยทUpdated 18 days agoยท 1,098
๐Ÿ‘„ F5-TTS Speech Editor
  • original_audio
  • edit_options
  • edited_audio
  • edit_info
โ—„original_textSome call me nature, others call me mother nature.โ–บ
โ—„target_textSome call me optimist, others call me realist.โ–บ
โ—„edit_regions1.42,2.44 4.04,4.9โ–บ
โ—„deviceautoโ–บ
โ—„modelF5TTS_v1_Baseโ–บ
โ—„seed1โ–บ
โ—„fix_durations1.2 1.0โ–บ
โ—„temperature0.8โ–บ
โ—„nfe_step32โ–บ
โ—„cfg_strength2.0โ–บ
โ—„sway_sampling_coef-1.0โ–บ
โ—„ode_methodeulerโ–บ

This is the surgical-edit node. You have a piece of speech - TTS you generated, or a real recording - and one word is wrong, or you want to swap "nature" for "optimist." Regenerating the whole line risks changing the whole performance. The F5-TTS Speech Editor instead regenerates only the regions you mark and splices them back in, matching the surrounding voice. It's genuinely one of the more distinctive things in this pack; most TTS nodes can't do targeted infilling at all.

Unlike the engine nodes, this one is self-contained - it takes audio in and gives edited audio out, no separate TTS_ENGINE needed.

How it works

F5-TTS is a flow-matching model, and flow-matching TTS can do "infilling": given the original audio, the original transcript, and a target transcript, it holds the untouched audio fixed and regenerates only the marked spans so they say the new words in the same voice. The catch - and it's the whole skill of using this node - is that you have to tell it exactly where in time to cut. That's what edit_regions is: start,end timestamps in seconds, one region per line. The pack's Audio Wave Analyzer exists precisely so you can scrub the waveform and read those timestamps off instead of guessing.

The inputs and outputs that matter

Four things drive an edit:

  • original_audio - the clip you're editing (AUDIO input).
  • original_text - the exact transcript of what's currently said. Accuracy matters; the model uses it to locate words.
  • target_text - what you want it to say after the edit.
  • edit_regions - the time spans to replace, e.g. 1.42,2.44 on one line and 4.04,4.9 on the next. Each line is one region.

Then the model and sampling controls: model (default F5TTS_v1_Base, with the same 12 F5 variants you'd pick by language), seed, and device on auto.

The optional inputs fine-tune the regeneration. fix_durations lets you force each edited region to a specific length in seconds (handy when the new word is longer or shorter than the old one and you need lip-sync or timing to hold). nfe_step (default 32), cfg_strength (default 2), temperature (default 0.8), sway_sampling_coef, and ode_method are the flow-matching sampler settings - leave them at defaults unless an edit sounds rough, then raise nfe_step. There's also an edit_options input that accepts an F5TTS_EDIT_OPTIONS bundle if you want to configure those separately.

Outputs: edited_audio (send to Preview/Save Audio) and edit_info, a text log of what it did.

Installing it

Ships with TTS Audio Suite. Simplest is ComfyUI Manager: search TTS Audio Suite, install, restart - Manager runs the pack's install.py, which untangles the dependency conflicts (NumPy, librosa, s3tokenizer) and Python 3.13. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/diodiogod/TTS-Audio-Suite.git, then python install.py from inside the folder with your ComfyUI venv active (run the script, not just pip install -r requirements.txt). Linux users install portaudio19-dev libsamplerate0-dev first. The F5 model (~1.2GB) auto-downloads on first run into ComfyUI/models/TTS/F5-TTS/. There's a ready-made "F5-TTS Speech Editor" example workflow in the repo - grab it, it saves you wiring the Audio Wave Analyzer by hand.

Common issues

  • The edit lands in the wrong place. Almost always a timestamp problem. edit_regions is unforgiving - if your start/end are off by even a couple hundred milliseconds you'll clip a word or edit the wrong syllable. Use the Audio Wave Analyzer to read exact timings rather than eyeballing them.
  • original_text doesn't match the audio. The model anchors on the transcript. If it's inaccurate, region detection drifts. Transcribe carefully.
  • The seam is audible. The new region doesn't blend. Try raising nfe_step, adjusting fix_durations so the replacement length matches the space it's filling, or re-rolling seed.
  • This isn't for whole-line changes. If you're rewriting most of the sentence, you're better off just regenerating from scratch with the โš™๏ธ F5 TTS Engine + TTS Text. The editor shines on small, targeted swaps.
CategoryTTS Audio Suite/๐Ÿ‘„ F5-TTS

Inputs (14)

NameTypeDefaultDescription
original_audioAUDIOOriginal audio to edit
original_textSTRINGSome call me nature, others call me mother nature.Original text that matches the original audio
target_textSTRINGSome call me optimist, others call me realist.Target text with desired changes
edit_regionsSTRING1.42,2.44 4.04,4.9Edit regions as 'start,end' in seconds (one per line). These are the time regions to replace.
deviceCOMBOautoDevice to run F5-TTS model on. 'auto' selects best available (GPU if available, otherwise CPU).
modelCOMBOF5TTS_v1_BaseF5-TTS model variant to use. F5TTS_Base is the standard model, F5TTS_v1_Base is improved version, E2TTS_Base is enhanced variant.
seedINT10โ€“4294967295Seed for reproducible F5-TTS generation. Same seed with same inputs will produce identical results. Set to 0 for random generation.
edit_optionsoptF5TTS_EDIT_OPTIONSOptional advanced editing options
fix_durationsoptSTRING1.2 1.0Fixed durations for each edit region in seconds (one per line). Leave empty to use original durations.
temperatureoptFLOAT0.80.1โ€“2Controls randomness in F5-TTS generation. Higher values = more creative/varied speech, lower values = more consistent/predictable speech.
nfe_stepoptINT321โ€“71Neural Function Evaluation steps for F5-TTS inference. Higher values = better quality but slower generation. 32 is a good balance. Values above 71 may cause ODE solver issues.
cfg_strengthoptFLOAT2.00โ€“10Speech generation control. Lower values (1.0-1.5) = more natural, conversational delivery. Higher values (3.0-5.0) = crisper, more articulated speech with stronger emphasis. Default 2.0 balances naturalness and clarity.
sway_sampling_coefoptFLOAT-1.0-2โ€“2Sway sampling coefficient for F5-TTS inference. Controls the sampling behavior during generation. Negative values typically work better.
ode_methodoptCOMBOeulerODE solver method for F5-TTS inference. 'euler' is faster and typically sufficient, 'midpoint' may provide higher quality but slower generation.

Outputs (2)

NameTypeDescription
edited_audioAUDIOโ€”
edit_infoSTRINGโ€”