Kokoro TTS 🔊:
KokoroTTS turns written text into spoken audio using the Kokoro speech model. It lets you create narration, dialogue, or spoken previews for a creative workflow, with control over the selected voice, speaking pace, and final volume. The node prepares the model and voice files when needed, generates speech from the text, and combines generated segments into one audio result.
Kokoro TTS 🔊 Input Parameters:
text
The words you want spoken. This is a required, multiline text field, so you can enter a sentence or a longer passage. The node removes whitespace at the beginning and end before generating speech and uses one or more line breaks as a boundary for splitting the text during generation. Text containing only spaces or line breaks is treated as empty. The field displays “Enter text to convert to speech” as a placeholder; the source does not specify a default, minimum length, or maximum length.
voice
The voice style used to speak your text. This is a required dropdown showing display names loaded from Languages.json. Your selection determines the voice file and the language setting used to create the speech pipeline. The default is the first display name in that file. The provided source does not include the file’s contents, so the available names and their order cannot be listed here.
speed
Controls the speech rate passed to the Kokoro pipeline. Use a value below 1.0 for slower speech or above 1.0 for faster speech. This optional setting defaults to 1.0, has a minimum of 0.5 and a maximum of 2.0, and changes in steps of 0.1. It affects how quickly the words are spoken, not the final volume.
volume
Controls the level of the final audio waveform. After generation, the node scales the waveform relative to its highest absolute sample value, then applies this setting. A lower value makes the result quieter; a higher value increases its level. This optional setting defaults to 1.0, has a minimum of 0.1 and a maximum of 2.0, and changes in steps of 0.1. Values above 1.0 can produce samples above the usual normalized range, so check the result in your downstream audio workflow.
Kokoro TTS 🔊 Output Parameters:
audio
The single AUDIO output contains the generated speech as a waveform and its sample rate. For a successful run, the node combines the generated segments into one waveform and reports a sample rate of 24,000 Hz. You can pass this output to a compatible audio playback, processing, or saving node. If generation fails, the node catches the error and instead returns a zero-filled waveform of 16,000 samples at a reported sample rate of 16,000 Hz. An audio output therefore does not, by itself, confirm that speech was generated.
Kokoro TTS 🔊 Usage Tips:
- Start with a short sentence and the default speed of 1.0 to check how your chosen voice sounds before generating a longer passage.
- Use line breaks where you want to separate sections of a script during generation. The node splits on one or more line breaks, then joins the resulting audio segments into one output.
- Adjust speed in 0.1 increments and listen after each change. For narration that feels rushed, try a value below 1.0; for a quicker read, try a value above 1.0.
- Set volume after choosing your voice and speed, and check the resulting level in your audio workflow. A value above 1.0 can make the waveform too strong for some later processing.
- Allow for model or voice-file downloads when you first use the node or select a voice whose file is not cached. If the output is silent, check the ComfyUI console: the node logs generation errors there but still returns an
AUDIOoutput.
Kokoro TTS 🔊 Common Errors and Solutions:
Text cannot be empty
- Explanation: The text field contains no words, or contains only spaces and line breaks. The node logs this error and returns a zero-filled audio result.
- Solution: Enter text to be spoken, then run the node again.
Kokoro TTS Error: Missing model files: ...
- Explanation: The model cache is missing one or more required files. The node attempts to download them; this message may appear as part of the cache check and does not necessarily mean the run has failed.
- Solution: Let the download finish and check whether speech is produced. If the download fails, check your internet connection and the console for the subsequent download error.
Error downloading model files: ...
- Explanation: A required model-file download failed. The text after the colon contains the underlying error, and the node returns zero-filled audio.
- Solution: Check your internet connection, access to the model repository, and whether ComfyUI can write to its model directory. Retry after resolving the cause shown in the console.
Failed to download voice file: ... .pt
- Explanation: The selected voice file was not available locally and its download failed. The node logs the download failure and returns zero-filled audio.
- Solution: Check your internet connection and access to the voice repository, then retry. Use the console’s preceding “Failed to download” message for the underlying cause.
Japanese Voice Support Required or Chinese Voice Support Required
- Explanation: The node could not import a package required for the selected Japanese or Chinese voice. Speech is not generated, although the node still returns an audio result.
- Solution: Follow the instructions in the console: enable the required packages in the ComfyUI folder’s
requirements.txt, runpip install -r requirements.txtin the appropriate environment, and restart ComfyUI.
Warning: espeak-ng not installed. Some words might not be pronounced correctly.
- Explanation: The node did not find
espeak-ngwhile checking a Spanish, French, Hindi, Italian, or Portuguese voice. This is a warning about possible pronunciation problems, not necessarily a failed run. - Solution: Listen to the result first. If pronunciation is affected, install
espeak-ngusing the platform-specific guidance printed in the console, then restart ComfyUI.
Error creating pipeline for language ...: ...
- Explanation: The Kokoro speech pipeline could not be created for the selected voice’s language. The underlying reason appears after the colon; the node catches the error and returns zero-filled audio.
- Solution: Read the full console message, confirm that the required language support and model files are installed, and retry after addressing the reported cause.
No audio generated
- Explanation: The pipeline returned no audio segments. The node logs the error and returns zero-filled audio instead of speech.
- Solution: Try a short, ordinary sentence, confirm that the selected voice and model files are available, and check earlier console messages for a more specific cause.
