[PR #13] [MERGED] feat(audio): add Capability.AUDIO_OPUS_BASE64 + decode_audio_envelope branch #12

Closed
opened 2026-10-26 22:28:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-remote-nodes/pull/13
Author: @Kosinkadink
Created: 5/16/2026
Status: ✅ Merged
Merged: 5/16/2026
Merged by: @Kosinkadink

Base: main ← Head: feat/audio-opus-base64


📝 Commits (1)

  • cd3e051 feat(audio): add Capability.AUDIO_OPUS_BASE64 + decode_audio_envelope branch

📊 Changes

3 files changed (+20 additions, -1 deletions)

View changed files

📝 client.py (+7 -0)
📝 protocol.py (+8 -0)
📝 serialization.py (+5 -1)

📄 Description

What

Pairs with Comfy-Org/comfy-rnp-server#23. Lets the proxy_node accept and decode audio:opus_base64 envelopes (OGG/Opus container as base64) so audio-out partner-node providers whose upstream returns OGG/Opus bytes (e.g. ElevenLabs output_format=opus_48000_192) can ship an honest envelope instead of label-laundering the bytes as mp3_base64.

Changes

protocol.py

  • Capability.AUDIO_OPUS_BASE64 = "audio:opus_base64".

client.py

  • CLIENT_CAPABILITIES now includes Capability.AUDIO_OPUS_BASE64, matching the AUDIO sweep precedent (mp3 + wav already in the list).

serialization.py

  • decode_audio_envelope allow-list extended with opus_base64. PyAV/FFmpeg already decode OGG/Opus natively in audio_bytes_to_audio_input, so the decoder branch is a one-line allow-list change — same path as MP3/WAV, just a different container.

Wire-format honesty

The wire-format hint is now honest rather than label-laundered: the inbound envelope's encoding matches the actual container, and the server gates emission on client_advertises_capability(headers, AUDIO_OPUS_BASE64).

The capability negotiation is symmetric to the existing image:png_base64_batch / audio:mp3_base64 negotiation: servers gate emission on the inbound advertise list, and the per-format fallback (mp3) is required while opus is opportunistic.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-remote-nodes/pull/13 **Author:** [@Kosinkadink](https://github.com/Kosinkadink) **Created:** 5/16/2026 **Status:** ✅ Merged **Merged:** 5/16/2026 **Merged by:** [@Kosinkadink](https://github.com/Kosinkadink) **Base:** `main` ← **Head:** `feat/audio-opus-base64` --- ### 📝 Commits (1) - [`cd3e051`](https://github.com/Comfy-Org/comfy-remote-nodes/commit/cd3e05195643150c218fa8689f884d9e675a25c5) feat(audio): add Capability.AUDIO_OPUS_BASE64 + decode_audio_envelope branch ### 📊 Changes **3 files changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `client.py` (+7 -0) 📝 `protocol.py` (+8 -0) 📝 `serialization.py` (+5 -1) </details> ### 📄 Description ## What Pairs with [Comfy-Org/comfy-rnp-server#23](https://github.com/Comfy-Org/comfy-rnp-server/pull/23). Lets the proxy_node accept and decode `audio:opus_base64` envelopes (OGG/Opus container as base64) so audio-out partner-node providers whose upstream returns OGG/Opus bytes (e.g. ElevenLabs `output_format=opus_48000_192`) can ship an honest envelope instead of label-laundering the bytes as `mp3_base64`. ## Changes **protocol.py** - `Capability.AUDIO_OPUS_BASE64 = "audio:opus_base64"`. **client.py** - `CLIENT_CAPABILITIES` now includes `Capability.AUDIO_OPUS_BASE64`, matching the AUDIO sweep precedent (mp3 + wav already in the list). **serialization.py** - `decode_audio_envelope` allow-list extended with `opus_base64`. PyAV/FFmpeg already decode OGG/Opus natively in `audio_bytes_to_audio_input`, so the decoder branch is a one-line allow-list change — same path as MP3/WAV, just a different container. ## Wire-format honesty The wire-format hint is now honest rather than label-laundered: the inbound envelope's `encoding` matches the actual container, and the server gates emission on `client_advertises_capability(headers, AUDIO_OPUS_BASE64)`. The capability negotiation is symmetric to the existing `image:png_base64_batch` / `audio:mp3_base64` negotiation: servers gate emission on the inbound advertise list, and the per-format fallback (mp3) is required while opus is opportunistic. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-remote-nodes#12
No description provided.