Drama 3 Encode Voice:
Drama3EncodeVoice prepares a speech recording as a reusable voice reference for Drama 3 voice cloning. Rather than generating new speech itself, it converts the recording into compact audio codes that Drama 3 can use as a reference when speaking new lines. During preparation, it converts the recording to mono, resamples it to 44.1 kHz if necessary, removes silent edges, and peak-normalizes the clip to standardize its level. It pairs the encoded speech with its exact written transcription, providing a reference that connects the recorded voice with the words spoken. A few seconds of clean speech work best. This makes the node useful for establishing voices for dialogue, narration, and other speech-generation workflows, with prepared references available for reuse through the companion voice-saving and voice-loading nodes.
Drama 3 Encode Voice Input Parameters:
codec
A required connection of type DRAMA3_CODEC that supplies the audio codec used to convert speech into Drama 3 audio codes. The codec is the component that translates the recording into the representation expected by the voice-generation workflow; it is not the speech-generation model itself. The node asks ComfyUI to load this codec onto its configured processing device before encoding the recording. Connect a compatible Drama 3 codec from your workflow rather than an audio file or a model connection of another type. There is no default value, numeric range, or selectable option defined for this parameter.
audio
A required connection of type AUDIO containing the reference recording and its sample rate. The node processes only the first item in the audio batch, averages its channels into mono, and resamples it to 44,100 Hz when its original sample rate differs. It then cleans up the clip by trimming silent edges and peak-normalizing it before encoding. The quality of this recording directly affects the reference available for cloning: use a few seconds of clear speech from the intended speaker, preferably without background music, overlapping voices, or distortion. No default recording, minimum or maximum duration, or selectable options are defined in the node interface.
transcript
A required multiline STRING containing exactly what is spoken in the reference recording. This text is stored with the audio codes so the downstream generation workflow receives both the recorded speech representation and its corresponding words. The node does not transcribe, verify, or correct this text, and changing it does not change how the audio is encoded. You can use Qwen3-ASR Transcribe to prepare a draft, then check it against the recording. By default, the reference applies to the speaker associated with its connection slot on Drama 3 Generate: for example, voice1 corresponds to <|speaker:1|>. A leading tag such as <|speaker:2|> selects speaker 2 instead. No explicit default text, length limits, or predefined options are specified.
Drama 3 Encode Voice Output Parameters:
DRAMA3_VOICE
A custom DRAMA3_VOICE value containing the original transcript and the audio codes produced from the prepared reference clip. Internally, it contains a transcript text field and a codes tensor stored in CPU memory. The codes represent the recording across 10 codebooks, with a shape of [10, frames]; the number of frames depends on the processed clip’s duration, and the codec pads audio to whole frames when encoding. These values are a machine-readable voice reference, not a playable audio recording or a newly generated line of speech. Connect this output to a voice slot on Drama 3 Generate to provide a cloning reference, or to Save Drama 3 Voice to preserve the reference and its transcript for later use.
Drama 3 Encode Voice Usage Tips:
- Start with a few seconds of clean speech from one speaker. This follows the node’s recommendation and avoids encoding an unnecessarily long reference.
- Match the transcript to the actual recording word for word. If you trim the recording before connecting it, update the transcript so it describes only the remaining speech.
- Use Qwen3-ASR Transcribe to help prepare the transcript, but listen to the recording and correct any recognition mistakes before encoding.
- Choose the intended speaker through the voice connection slot on Drama 3 Generate. If you need an explicit assignment, place a leading tag such as <|speaker:2|> before the transcript; this overrides the slot-based speaker assignment.
- You do not need to manually convert ordinary audio to 44.1 kHz or mono, because the node handles those conversions. However, listen to stereo recordings with strongly separated voices first: averaging channels can combine speakers into an unsuitable reference.
- Do not rely on peak normalization to repair poor recordings. It standardizes the peak level but does not establish that background noise, clipping, or overlapping speech has been removed.
- Supply one intended reference clip at a time. If the incoming audio contains multiple batch items, only the first is encoded.
- Connect the result to Save Drama 3 Voice when you want to reuse it. The companion nodes save the codes and transcript to
output/drama3_voicesand load them again without repeating reference encoding.
Drama 3 Encode Voice Common Errors and Solutions:
Missing required input: codec, audio, or transcript
- Explanation: All three connections or values are required by the interface. ComfyUI may report a validation error before execution if one is missing; the exact wording depends on your ComfyUI version.
- Solution: Connect a compatible
DRAMA3_CODEC, supply anAUDIOrecording, and enter its exact transcript before running the workflow.
Input type mismatch
- Explanation: The codec connection expects
DRAMA3_CODECand the recording connection expectsAUDIO. A model, file-path string, or encoded voice is not interchangeable with these types. - Solution: Check the socket types on the connected nodes. Supply the codec through its codec output and load the recording through a node that produces ComfyUI audio.
KeyError: 'waveform' or KeyError: 'sample_rate'
- Explanation: The implementation reads these two fields directly from the audio value. These Python errors can occur if an upstream custom node supplies an incomplete or incorrectly structured audio object.
- Solution: Test the recording with a standard ComfyUI audio-loading node. If that works, inspect or update the upstream custom node that supplied the malformed audio.
IndexError or an error involving audio dimensions
- Explanation: The implementation expects audio arranged as batch, channels, and samples, then selects the first batch item. An empty batch or incorrectly shaped waveform can fail during indexing or subsequent processing; the precise message depends on the operation that fails.
- Solution: Reload a valid, nonempty recording through a compatible audio loader. If you use a custom audio-processing node, ensure it preserves the standard ComfyUI audio structure.
CUDA out of memory
- Explanation: On CUDA devices, loading the codec or encoding a recording can fail if insufficient GPU memory is available. Long recordings or other loaded models can contribute to memory pressure.
- Solution: Try a shorter reference containing a few seconds of speech, release other GPU-heavy workloads, and use ComfyUI’s model-memory management settings as appropriate for your hardware.
Empty or silent recording produces a processing failure or unusable reference
- Explanation: This is a possible input problem rather than a custom error message defined by the node. A clip with no useful speech does not provide a meaningful cloning reference, and its behavior during cleanup or encoding depends on the underlying processing.
- Solution: Preview the recording before encoding and confirm that it contains audible speech. Replace empty or silence-only clips with a clear spoken reference.
The cloned voice follows the wrong speaker
- Explanation: This is a downstream assignment issue, not an encoding exception. A leading speaker tag in the transcript can select a different speaker from the one associated with the connected voice slot.
- Solution: Check both the Drama 3 Generate voice slot and the beginning of the transcript. Remove an unintended leading tag or change it to the speaker you want.
The reference encodes successfully, but generated speech is unsatisfactory
- Explanation: Successful encoding does not confirm that the transcript matches the recording or that the recording is suitable. Background sound, multiple speakers, distortion, and transcription mistakes can all make the reference less useful.
- Solution: Try a clean, single-speaker clip lasting a few seconds and verify every spoken word in the transcript. Re-encode the corrected reference before testing generation again.
