Audio retimer
The Retimer That's Secretly a Pitch Shifter
- input_audio
- audio
The name says "retimer," but the first toggle decides whether it's also a pitch shifter. That single fact trips up more people than anything else in this pack. The retimer lives in the same package as ComfyUI Custom Dia, the ComfyUI port of nari-labs' Dia text-to-dialogue model, and it exists because Dia gives you no way to speed up or slow down the dialogue it just spat out - you regenerate, and regeneration is both slow and seed-fickle. So the author bolted on a tiny audio utility that stretches or squashes any AUDIO tensor you feed it, no matter where it came from. Plug in a generated dialogue track, adjust the pacing, and wire the result into the rest of your graph.
How it works
Three inputs, one output. That's the whole node:
input_audio- anAUDIOtensor from any compatible node, most commonly theaudiooutput of the Dia text to speech node.speed- a float from 0.3 to 3.0. Below 1 slows down, above 1 speeds up. Straightforward.preserve_pitch- and here's the catch.
With preserve_pitch off, the node cheats: it resamples the audio to a different sample rate and then back, which changes duration and pitch at the same time. That's the old tape-speed trick - speed up a voice and it goes chipmunk, slow it down and it goes demonic. Sometimes that's exactly what you want (a horror effect, a pitched-up gag voice), and it costs nothing extra.
With preserve_pitch on, the node loads librosa and uses librosa.effects.time_stretch instead, which changes the tempo without touching the pitch. This is the one you want for dialogue that just needs to be snappier or more relaxed. The output is a standard audio tensor at the original sample rate, so it drops straight into anything that takes AUDIO - save it, encode it, chain another effect.
The gotcha: librosa is optional, literally
preserve_pitch is on by default, and the moment you run the node with it on, you'll get a red error that says "Librosa must be installed to enable pitch preservation." Don't panic. librosa is deliberately not in the pack's requirements.txt because it's a heavy install, so the error isn't a broken node - it's the author asking you to add it if you want this feature. If you hit it, open ComfyUI's terminal and run:
pip install librosa
Then restart ComfyUI and rerun. If you don't need pitch preservation, flip preserve_pitch to false and never install it.
Where people get burned
The 0.3–3.0 clamp on speed is the real speed limit - the node will not go beyond 3x, and if you need a wilder stretch you'll have to resample in steps or use another tool. Also note there's no save_audio_file toggle here like the TTS node has; this is a pure transformer, so you'll want it feeding a save or preview node rather than running it standalone. And one honest word about expectations: this is a utility node, not a miracle worker. It changes pacing cleanly up to about 1.5x; push much past that and even with pitch preservation you'll hear artifacts. For its one job - tightening up a too-slow Dia line without regenerating - it's the node you'll actually reach for.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_audio | AUDIO | — | |
| preserve_pitch | BOOLEAN | true | — |
| speed | FLOAT | 1.000.3–3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |