Nodes/ComfyUI-HttpRequestNodes/Audio To Blob Node
ComfyUI Node

Audio To Blob Node

Send your ComfyUI audio to a TTS or voice-clone API as WAV bytes

By ahkimkoo·Created 3 months ago·Updated 3 months ago· 1
Audio To Blob Node
  • audio
  • wav_bytes

The Audio To Blob Node is how you get sound out of ComfyUI and into an API. ComfyUI's AUDIO type is an in-memory tensor with a sample rate - nothing an HTTP endpoint can receive. This node converts that AUDIO to real WAV bytes, which is exactly what voice-conversion services, TTS backends, and audio-processing APIs want to ingest. It's one half of the fork's core promise: the upstream ComfyUI-RequestNodes only handled images, and this is the node that extends it to audio.

It's part of ComfyUI-HttpRequestNodes, ahkimkoo's fork of felixszeto's ComfyUI-RequestNodes. On the send side it pairs with the Binary Post Request Node (raw WAV over octet-stream) or the Media Form Post Node (WAV as a multipart file). On the receive side, Blob To Audio Node does the reverse - which is how you build a round-trip pipeline where a TTS server's audio comes back into your graph.

How it works

One input, audio (AUDIO), one output, wav_bytes (BYTES). The code unpacks the AUDIO dict - a waveform tensor in [batch, channels, samples] shape plus a sample_rate - drops the batch dimension, transposes to [samples, channels], clips to the float range, converts to 16-bit integers, and writes a WAV via the soundfile library. The output is raw WAV bytes, so wav_bytes feeds straight into Binary Post's body.

Two things worth knowing. First, the output is always 16-bit WAV - no format or bit-depth options, and nothing but WAV. If an API wants MP3 or FLAC, this isn't the node. Second, it assumes a single audio clip: the batch dimension gets squeezed, so a batch of multiple clips collapses into one. Keep it to one clip at a time.

Install

ComfyUI Manager → search ComfyUI-HttpRequestNodes → Install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-HttpRequestNodes
pip install soundfile imageio imageio-ffmpeg

Category: RequestNode/Converters. The soundfile package is the one real dependency here - it's what does the WAV encoding. If you hit ModuleNotFoundError: soundfile on first run, that's the pip line that fixes it. No models, no keys.

CategoryRequestNode/Converters

Inputs (1)

NameTypeDefaultDescription
audioAUDIO

Outputs (1)

NameTypeDescription
wav_bytesBYTES