Drama 3 Decode:
Drama3Decode, displayed as Drama 3 Decode in the audio/drama3 category, turns Drama 3’s compressed sound codes into playable 44.1 kHz audio using the Fish S2-Pro codec. It provides the final sound reconstruction step, allowing you to listen to generated speech rather than work with its compressed representation. When speakers have been generated separately, it decodes the material take by take and joins the takes in script order, inserting 0.3 seconds of silence between them. Optional pause cleanup makes the result more compact by shortening extended silences and trimming silence at the beginning and end. This makes the node useful both for preparing dialogue for listening and for retaining the original generated timing when you need to edit the audio yourself.
Drama 3 Decode Input Parameters:
codec
A required DRAMA3_CODEC connection supplying the audio codec that reconstructs sound from Drama 3 codes. Connect the result of Load Drama 3 Codec, which loads the Fish S2-Pro codec used by Drama 3. This is a specialized audio model, not an image VAE or a general-purpose audio decoder, so the correct codec is essential for interpreting the compressed sound representation. The codec works at 44.1 kHz and uses ten codebooks, which are the sets of sound representations used to reconstruct the waveform. No default value, numeric minimum or maximum, or selectable options are defined for this input; you must provide a compatible codec connection.
codes
A required DRAMA3_CODES connection containing the compressed audio material and its associated script and take information. This supplies what the node will reconstruct and provides the context needed to assemble separately generated takes in script order. You can connect a compatible Drama 3 codes source, including Load Drama 3 Codes when reopening previously saved material. A loaded codes object contains the fields codes, lines, and takes; it is not interchangeable with plain text, an ordinary audio file, or an arbitrary tensor. The underlying codec expects ten codebooks arranged across audio frames. No default value, numeric minimum or maximum, or selectable options are defined for this input.
shorten_long_pauses
A required BOOLEAN setting with the options True and False; its default is True, and numeric minimum and maximum values do not apply. When enabled, it shortens pauses longer than 0.75 seconds to 0.75 seconds, removes silence before the first sound, and retains 0.15 seconds after the last sound, following the behavior described for Fish Audio’s Drama 3 Space. This cleanup is applied after decoding and assembling the waveform, and only when the codes contain at least one frame. Enable it when you want tighter dialogue timing, or disable it when you want to preserve pauses and boundary silence for later editing. Turning it off disables this optional silence cleanup; it does not disable the 0.3-second gaps used when joining separately generated takes.
Drama 3 Decode Output Parameters:
AUDIO
The single AUDIO output contains the reconstructed mono sound in ComfyUI’s audio format, with a waveform tensor and a sample_rate value of 44100. The waveform represents the actual sound samples rather than compressed Drama 3 codes, and its added batch dimension makes it suitable for downstream ComfyUI audio nodes. Its duration reflects the decoded takes, any inserted gaps between takes, and any silence shortening or boundary trimming enabled by shorten_long_pauses. Connect it to an audio playback, saving, or processing node to audition the result, export it, or continue editing. The 44.1 kHz sample rate is fixed by this node rather than exposed as an adjustable setting.
Drama 3 Decode Usage Tips:
- Connect Load Drama 3 Codec to
codecand a compatible Drama 3 codes source tocodes. For saved material, Load Drama 3 Codes provides the expected structured codes object. - Leave
shorten_long_pausesenabled for a compact listening version of dialogue. It is particularly useful when generated speech contains long silent stretches or excess silence at its boundaries. - Disable
shorten_long_pausesfor dramatic readings, deliberate pauses, or workflows where you plan to adjust timing manually. Compare both versions using the same codes to judge whether cleanup changes the pacing you want. - Remember that separately generated takes receive a fixed 0.3-second joining gap. There is no gap-duration control on this node; use downstream audio editing if you need different spacing.
- Preserve your original Drama 3 codes when testing pause cleanup. You can decode them again with a different setting without needing to regenerate the speech.
- If you run into memory limits, close other memory-intensive workflows and test a shorter piece of material. The codec already decodes in windows to limit memory growth, but this does not eliminate all memory requirements.
Drama 3 Decode Common Errors and Solutions:
Required input is missing: codec or codes
- Explanation: ComfyUI may report a missing required input when either connection is absent. The exact validation message depends on your ComfyUI version; the node cannot reconstruct audio without both the codec and the codes.
- Solution: Connect Load Drama 3 Codec to
codecand a source producing DRAMA3_CODES tocodes. Ensure both upstream nodes are configured and can execute successfully.
Input type mismatch
- Explanation: A connection validation error can occur if you supply an incompatible type, such as ordinary AUDIO, text, or an image VAE, where DRAMA3_CODES or DRAMA3_CODEC is expected. The exact message depends on ComfyUI’s validation system.
- Solution: Use the specialized Drama 3 nodes for both connections. If you have an audio file rather than saved Drama 3 codes, do not connect it directly to
codes.
KeyError: 'codes'
- Explanation: The execution code accesses the
codesfield in the supplied codes object. A malformed object without that field can produce this Python error; other missing metadata may also prevent the decoding helper from working. - Solution: Reload the material through Load Drama 3 Codes or reconnect a compatible Drama 3 codes source. Avoid manually substituting a plain tensor or incomplete dictionary.
ValueError: filename is not a Drama 3 codes file
- Explanation: This error comes from the upstream Load Drama 3 Codes node rather than Drama3Decode itself. In the actual message,
filenameis replaced by the selected file name. The loader raises it when the file lacks requiredlinesortakesmetadata, or thecodestensor. - Solution: Select a file created by Save Drama 3 Codes. Renaming an ordinary audio or tensor file will not make it compatible; if necessary, save the codes again from a working Drama 3 workflow.
CUDA out of memory
- Explanation: This possible PyTorch error indicates that decoding needs more GPU memory than is currently available. Although the codec processes audio in windows, model weights and decoding operations still require memory.
- Solution: Close other GPU-heavy applications, release unused models or workflows, and retry with shorter material. Changing
shorten_long_pausesis not a reliable remedy because pause cleanup happens after decoding.
RuntimeError involving tensor size, shape, or an index out of range
- Explanation: Errors of this kind can occur when code tensors are incompatible with the codec, incorrectly shaped, or contain invalid code values. The codec expects ten codebooks across a sequence of frames; the precise error depends on where the incompatible data is encountered.
- Solution: Use codes and codec weights intended for this Drama 3 implementation. Reload the original saved codes, avoid manually reshaping their tensors, and test a known-working codes file to help identify whether the problem is with the material or the codec.
