ComfyUI-TTS-Webui Introduction
ComfyUI-TTS-Webui adds text-to-speech nodes to ComfyUI. You can enter dialogue, narration, or other written text in a node, send it to a TTS WebUI server, and receive spoken audio that you can use in the rest of your workflow.
The extension is useful when you want to create a voice track without leaving ComfyUI to generate and import a separate audio file. It can also save a WAV file to ComfyUI’s output/audio folder when you want a file to use elsewhere.
Example ComfyUI-TTS-Webui workflow
The nodes connect to a TTS WebUI OpenAI-style speech endpoint. “OpenAI-style” describes the format of the server request; it does not mean the extension itself generates speech or that you must use an OpenAI service. You need a reachable TTS WebUI server that accepts requests at /v1/audio/speech and returns WAV audio.
How ComfyUI-TTS-Webui Works
Think of a TTS node as a messenger between your ComfyUI workflow and a speech-generating server:
- You provide the words. Enter the text you want spoken in the
textfield. - You choose where to send them. The
api_basefield identifies your TTS WebUI server. Its default ishttp://127.0.0.1:7778, which points to a server running on the same computer. - The node requests speech. It sends your text and selected options to the server’s
/v1/audio/speechendpoint and requests WAV output. - ComfyUI receives audio. The extension converts the returned WAV into an in-memory ComfyUI
AUDIOobject, including the waveform and sample rate, so another node can use it. If you enable saving, it also writes a WAV file tooutput/audio.
The server does the speech generation. The ComfyUI nodes make its options available in your workflow and handle the audio it sends back. For example, you might enter a line of character dialogue, select an available voice in a model-specific node, and pass the resulting AUDIO output to the next part of your workflow.
ComfyUI-TTS-Webui Features
Speech nodes for different workflows
The extension includes a general-purpose TTS WebUI via API node and separate nodes for Kokoro, Chatterbox, StyleTTS2, Kitten TTS, and F5-TTS. It also includes a TTS Preset node.
The general-purpose node offers a way to work with the speech endpoint when you need more control over the request. The model-specific nodes present inputs relevant to their respective models and assemble the request for you. Available inputs can include options such as voice, speed, or other model parameters. The provided documentation does not define every model-specific setting, so check the inputs shown on the node and the options supported by your TTS server.
Shared inputs and output options
text: The words you want the server to speak. This is a multiline field, so it can hold more than a short phrase.api_base: The base address of your TTS WebUI server. The default ishttp://127.0.0.1:7778; change it if your server uses another address or port.api_key: An optional key for a server that requires authentication. The field is presented as a password input.timeout_sec: How long the node waits for a server response before the request times out. A longer value may help when a request takes more time to finish.channels_first: Controls the layout of the returned audio data:(C, N)when enabled or(N, C)when disabled, whereCrepresents channels andNrepresents audio samples. This matters if a downstream node expects a particular layout.also_save_wav: Saves a WAV file under ComfyUI’soutput/audiofolder as well as returning in-memory audio.save_prefix: Sets the filename prefix used when saving a WAV.return_metadata: Returns a metadata JSON string when enabled.
You can use the in-memory AUDIO output without saving a file. Enable also_save_wav when you also need a WAV outside the workflow.
Advanced request control
The general-purpose node has an advanced_request_json input that overrides its default request payload. This is for cases where you know the JSON options your TTS server expects and need to send them directly. An example request body is:
{
"model": "kokoro",
"input": "Hello from ComfyUI",
"voice": "random",
"speed": 1.0,
"response_format": "wav",
"params": {"temperature": 0.7}
}
Here, input contains the words to speak, model and voice specify requested server options, and response_format requests WAV audio. The params object holds an additional option in this example. Treat the values as an illustration, not a promise that every server or model accepts them.
ComfyUI-TTS-Webui Models
The extension provides dedicated nodes for these model names:
| Node | When to choose it |
|---|---|
| TTS Kokoro | When your TTS WebUI server offers Kokoro and you want its model-specific inputs. |
| TTS Chatterbox | When your server offers Chatterbox and you want its model-specific inputs. |
| TTS StyleTTS2 | When your server offers StyleTTS2 and you want its model-specific inputs. |
| TTS Kitten TTS | When your server offers Kitten TTS and you want its model-specific inputs. |
| TTS F5-TTS | When your server offers F5-TTS and you want its model-specific inputs. |
TTS WebUI via API is the general-purpose node; TTS Preset is also included. These are node names, not additional speech models.
The provided information does not compare the models’ voices, quality, speed, language support, or hardware needs. Your results depend on the models and settings available on your TTS WebUI server. For a first test, choose a dedicated node for a model your server supports, enter a short line of text, and listen to its output before adjusting the available controls.
Troubleshooting ComfyUI-TTS-Webui
The node cannot reach the server
- Check that your TTS WebUI server is running.
- Compare the node’s
api_basewith the address and port your server uses. The default,http://127.0.0.1:7778, refers to the same computer as ComfyUI. - Confirm that the server provides the
/v1/audio/speechendpoint expected by this extension. - If the request times out while the server is working, try a higher
timeout_secvalue and a short test sentence.
The server asks for authorization
Enter the server’s key in the api_key input if one is required. The extension can also look for a key in the TTS_WEBUI_OPENAI_API_KEY environment variable. For backward compatibility, it checks SAI_API_KEY as well, and it can read tts_api_key.txt or sai_platform_key.txt beside the custom node. When it finds a key, it sends it as a bearer authorization header. Make sure the key you supply belongs to the server you are calling.
A request runs, but the audio is not what you expected
- Try a short, simple sentence to narrow down whether the problem relates to the text or a selected option.
- Check that the model and any voice or other options are supported by your server.
- If you used
advanced_request_json, check its JSON syntax and the values expected by your server. This input replaces the general-purpose node’s default payload. - If a downstream node cannot use the returned audio, check whether its expected channel layout matches the
channels_firstsetting.
I cannot find a saved WAV file
The node can return audio without writing a file. Turn on also_save_wav, then look in ComfyUI’s output/audio folder. Use save_prefix if you want saved files to be easier to identify.
Frequently asked questions
Do I need to save a WAV to use the speech in ComfyUI?
No. The node returns an in-memory ComfyUI AUDIO object. Saving a WAV is optional.
Can I use a TTS server on another address or port?
Yes. Set api_base to the base address of the server you intend to use, provided it supports the expected speech endpoint.
Does “OpenAI-style” mean I need an OpenAI account?
No. It describes the request format used to communicate with the TTS WebUI endpoint.
Which model should I start with?
Start with a dedicated node for a model available on your server. The supplied documentation does not establish that one model is best for a particular artistic style.
Learn More about ComfyUI-TTS-Webui
- Example workflow: See how the extension’s nodes can appear in a ComfyUI workflow.
- License: Read the terms for using the extension.
