Nodes/ComfyUI-TTS2Whisper/Whisper Segments Alignment Audio Save And Get Path
ComfyUI Node

Whisper Segments Alignment Audio Save And Get Path

Hand your TTS audio to Whisper as a file instead of a wire

By teddy1565·Created 5 months ago·Updated 5 months ago· 2
Whisper Segments Alignment Audio Save And Get Path
  • audio
  • path

Some Whisper ASR nodes want a file path, not an in-memory AUDIO wire. Your TTS node outputs AUDIO in the graph, and somewhere downstream there's a node that only speaks in paths. That mismatch is exactly what Whisper Segments Alignment Audio Save And Get Path (mouthful, I know) is for: it takes an AUDIO wire, writes it to a temp WAV on disk, and hands you the path. Bridge node, nothing more.

The pack's README - all one line of it - says "TTS Audio not support cosyvoice asr." That's the hint: not every ASR setup can consume TTS-generated audio directly, and flushing it to a file is the workaround. This node is the plumbing for that.

How it works. Simple and honest. It takes one input, audio (AUDIO, force-input - wire in your TTS output). Using torchaudio.save, it writes the waveform to ComfyUI's temp directory (folder_paths.get_temp_directory()) with a fresh UUID filename like tts2whisper-<uuid>.wav, then returns that path. One output, named path, with the type AUDIOPATH - which is the important bit.

Install. It's part of teddy1565/ComfyUI-TTS2Whisper. ComfyUI Manager: search "ComfyUI-TTS2Whisper", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/teddy1565/ComfyUI-TTS2Whisper

Dependencies are pypinyin, numpy, torchaudio, torch. torchaudio is the one doing the actual saving here, so make sure it's present. No models download from this pack.

Things worth knowing before you wire it in:

  • The output type is AUDIOPATH, not STRING. Whatever you connect this to has to accept AUDIOPATH - that's what makes it a bridge rather than a dead end. If the downstream node wants a plain string, this won't drop in.
  • Nothing gets transcribed or processed here. It saves and returns a path; the ASR happens in the node you connect it to.
  • Files accumulate in ComfyUI's temp folder with UUID names. Run a big batch and you'll leave cruft behind - it's a temp dir, so your OS or a cleanup pass handles it eventually, but don't expect the node to tidy up after itself.
  • The filename is random per run, so don't try to predict it or feed it into anything that needs a stable path.

If your Whisper node already accepts an AUDIO wire, you don't need this node at all - it only earns its place when you're talking to a path-based ASR. In that workflow it's a one-node solution to a mismatch that would otherwise force you to save audio manually before running the graph.

CategoryTTS2Whisper/InjectTools

Inputs (1)

NameTypeDefaultDescription
audioAUDIO

Outputs (1)

NameTypeDescription
pathAUDIOPATH