Nodes/ComfyUI-OSS-Upload/OSS Audio Uploader
ComfyUI Node

OSS Audio Uploader

Get Your TTS Voiceover Off the Local Disk

By ahkimkoo·Created about a year ago·Updated 8 months ago· 1
OSS Audio Uploader
  • audio
  • url
endpointoss-cn-shanghai.aliyuncs.com
bucketcck-sh
access_key
access_secret
pathaigc/up
random_filenametrue
filenameaudio.wav

Audio is still the frontier in ComfyUI. Most people get sound out of a TTS or music node that emits an AUDIO type, and then there's nowhere great to put it - ComfyUI ships no "save audio to the cloud" step, and the local output folder is a dead end if something downstream needs a URL. This node is the missing step: AUDIO in, hosted URL out, straight into an Alibaba Cloud OSS bucket.

It's part of the ComfyUI-OSS-Upload pack, the same family as the image, video, and file uploaders, and it shares their whole setup. OSS is Alibaba's object storage, which matters if your ComfyUI already runs on Alibaba Cloud hosting - the bucket is where generated artifacts belong, and a TTS voiceover destined for a dubbing pipeline or a hosted site is exactly that kind of artifact.

How it works

It reads the AUDIO dict (the waveform tensor plus sample_rate), flattens the leading batch dimension, writes the audio to a WAV file in ComfyUI's temp directory using scipy.io.wavfile, then uploads that file via the oss2 SDK. Retries run up to 20 attempts, three seconds apart (the code; the README says 10). The URL comes back as https://{bucket}.{endpoint}/{path}/{filename}.

The inputs that matter

  • audio - the AUDIO-typed output from a TTS or audio-generation node. That's the whole "media" side; nothing else to wire in.
  • endpoint, bucket, access_key, access_secret - your OSS settings. The defaults are the author's own bucket (cck-sh, path aigc/up) - change them, they're not yours.
  • path - folder prefix inside the bucket.
  • random_filename (default on) - timestamp + random string so filenames never collide. Off means filename is used.

What comes out

One output: a url STRING. That's the hosted file - feed it to a text node to eyeball it, or pass it into whatever step consumes the voiceover.

Gotchas, straight from the source

It always writes WAV. Set filename to voice.mp3 and you'll get a file named voice.mp3 whose bytes are WAV - scipy writes int16 WAV regardless. If you need compressed audio, convert after upload. Most ComfyUI audio nodes hand you uncompressed audio anyway, so this is usually a non-issue, but know the extension lies.

The dependency that bites: this node imports scipy.io.wavfile. The README's install line is just pip install oss2, which leaves the audio node dead on import on a lean box. Most ComfyUI installs already have scipy (it rides along with dozens of custom nodes), but if your audio uploader errors at startup, that's the cause. Install the pack's full requirements.txt and it's sorted.

Same error-swallowing as its siblings: on failure the node returns a string starting with Error: instead of raising, and the real exception plus retry messages land in the console log. And same security rule: your OSS keys live in the workflow JSON, so use a scoped AccessKey, keep the bucket private, and don't share workflows with live keys in them.

Installing it

Manager → search "ComfyUI-OSS-Upload" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-OSS-Upload

then restart ComfyUI. No model downloads, no GPU cost - it's a disk-and-network node. Get the full dependency set:

pip install -r custom_nodes/ComfyUI-OSS-Upload/requirements.txt

Reach for it when a voiceover has to become a URL another service reads - dubbing pipelines, multi-step audio chains, anything where "it's in my output folder" isn't a usable answer. If you make a TTS clip and drag it around by hand, you don't need this node. If your audio is part of a content factory, you do.

CategoryOSS Upload

Inputs (8)

NameTypeDefaultDescription
audioAUDIO
endpointSTRINGoss-cn-shanghai.aliyuncs.com
bucketSTRINGcck-sh
access_keySTRING
access_secretSTRING
pathSTRINGaigc/up
random_filenameBOOLEANtrue
filenameSTRINGaudio.wav

Outputs (1)

NameTypeDescription
urlSTRING