MOSS-TTS Voice Reference:
MOSSTTSVoiceReference prepares a voice reference for use in a MOSS-TTS workflow. It passes the supplied audio information to the voice-reference builder and returns the resulting voice object, so you can connect that reference to a compatible downstream node. The class shown here does not reveal how the builder processes audio, which formats it accepts, or whether it can identify a speaker from a particular recording.
MOSS-TTS Voice Reference Input Parameters:
audio
An optional AUDIO connection for supplying a recording from another node. The node passes this value to the voice-reference builder. Use it when your recording is already available in the workflow. No default, minimum, maximum, or audio-format options are specified in the node interface; the build method uses None when this input is not connected.
audio_path
An optional, single-line STRING field for a path to an audio file. The node passes this text to the voice-reference builder, allowing you to point it to a recording by path. Its default is an empty string (""). No minimum length, maximum length, file-format restriction, or path-selection options are specified. The provided class does not show how the builder handles an empty path, a missing file, or a path supplied alongside audio.
MOSS-TTS Voice Reference Output Parameters:
voice
The sole output is a MOSS_TTS_VOICE value returned by the voice-reference builder. It represents the prepared voice reference for compatible MOSS-TTS nodes; it is not an audio preview or a generated speech recording. The provided class does not expose the value’s internal fields or guarantee what it contains beyond its declared output type.
MOSS-TTS Voice Reference Usage Tips:
- Connect a recording to
audiowhen it is already flowing through your ComfyUI workflow; useaudio_pathwhen you have a file path to enter instead. - Start with one source method at a time. The class forwards both values to the builder, but the provided code does not establish which one takes priority when both are supplied.
- If you enter
audio_path, check that the path points to a file accessible to the environment running ComfyUI. A path on your own computer may not be accessible to a remote ComfyUI instance. - Connect
voiceto a downstream socket that acceptsMOSS_TTS_VOICE. The node prepares a reference; it does not generate speech on its own.
MOSS-TTS Voice Reference Common Errors and Solutions:
Missing or unusable voice-reference source
- Explanation: If neither
audionor a usableaudio_pathis provided, the builder may be unable to create a voice reference. The provided class does not specify an exact error message or whether an empty source is accepted. - Solution: Connect an
AUDIOvalue or enter a path to an accessible audio file, then run the node again.
Audio file not found or inaccessible
- Explanation: A path that is incorrect or unavailable to the ComfyUI process may cause the underlying builder to fail. The exact message depends on its implementation and is not shown in the provided source.
- Solution: Check the file name and full path, confirm the file exists where ComfyUI runs, and confirm that process can read it.
Audio cannot be processed
- Explanation: The builder may reject a recording it cannot read or process. Supported formats and any resulting error text are not defined by this class.
- Solution: Confirm the file opens and plays correctly, then try another valid recording or convert it to a format supported by your installed MOSS-TTS voice-reference implementation.
Cannot connect voice to the next node
- Explanation: ComfyUI sockets must have compatible types. This node produces
MOSS_TTS_VOICE, notAUDIO. - Solution: Connect
voiceto an input that acceptsMOSS_TTS_VOICE; use an audio-producing node if the next step requiresAUDIO.
ModuleNotFoundError: No module named 'folder_paths'
- Explanation: This message may appear elsewhere in an incomplete ComfyUI installation, but the helper shown for this node catches failures while importing
folder_pathsand creates atempdirectory under the current working directory instead. The message alone therefore does not establish that this node failed. - Solution: Check the full error trace to identify which component raised it. If this node is failing while preparing its temporary directory, check that the current working directory is writable.
