TTS WebUI StyleTTS2:
TTS_StyleTTS2Node turns written text into speech by sending a synthesis request to a StyleTTS2 service. It gives you a way to generate spoken audio within an AI art workflow, with controls for the synthesis request and options for saving or inspecting the result. The node requests WAV audio from the service; the sound and availability of the result depend on the service you connect to.
TTS WebUI StyleTTS2 Input Parameters:
text
Required STRING. Enter the words you want spoken, such as a line of narration or dialogue. The node sends this text as the request’s speech input, so changing it changes what the service is asked to say. No default, minimum length, or maximum length is specified in the provided node source.
api_base
Required STRING. Enter the base address of the speech service that will receive the request. The node uses this address to submit the text and synthesis settings. No default or required URL format is specified in the provided node source; the address must work with the connected service and the node’s request handling.
api_key
Optional STRING; default: empty string. Supply a key when your service requires authentication. The input is marked as a password field, which helps conceal the value while you enter it. An empty value is passed by default; whether that works depends on the service.
alpha
Optional FLOAT; minimum: 0.0, maximum: 1.0, default: 0.3, step: 0.01. This value is sent to the service in the StyleTTS2 params settings. Changing it may affect the generated speech, but the provided node source does not define what higher or lower values sound like. Keep the default as a starting point and compare results from the same text when adjusting it.
beta
Optional FLOAT; minimum: 0.0, maximum: 1.0, default: 0.7, step: 0.01. This is another value sent in the StyleTTS2 params settings. Its audible effect is not defined by the provided source and may depend on the service implementation. Adjust it independently of alpha when comparing results so you can tell which change made a difference.
diffusion_steps
Optional INT; minimum: 1, maximum: 200, default: 5. This sets the diffusion_steps value in the synthesis request. The node does not itself perform or describe the diffusion process, so the effect on sound quality and processing time depends on the service. If you experiment with higher values, allow for the possibility of a longer request.
embedding_scale
Optional FLOAT; minimum: 0.0, maximum: 5.0, default: 1.0, step: 0.01. This value is sent in the StyleTTS2 params settings. The provided source does not specify what it scales or predict how it changes the voice. Use the default until you have guidance from your service or can compare its results reliably.
timeout_sec
Optional INT; minimum: 1, maximum: 600, default: 120. This sets the request timeout in seconds. A longer timeout gives a slow service more time to respond; a shorter one ends an unresponsive request sooner. Increasing it will not fix an incorrect address or a service that is unavailable.
channels_first
Optional BOOLEAN; default: True. This setting is passed to the node’s audio-result handling and concerns how audio channels are arranged in the returned AUDIO value. Leave it at the default unless another part of your workflow requires a different channel arrangement. The provided source does not show the exact resulting audio shape.
also_save_wav
Optional BOOLEAN; default: False. This setting is passed to the node’s result handling to request an additional saved WAV file. Enable it when you need a file as well as the AUDIO output. The provided source does not specify the save location or filename rules.
save_prefix
Optional STRING; default: tts. This value is passed to result handling as the prefix for a saved file. It is most relevant when also_save_wav is enabled. The provided source does not define how the complete filename is formed or whether particular characters are allowed.
return_metadata
Optional BOOLEAN; default: True. This setting controls whether result handling is asked to return metadata. Keep it enabled when you want information about the synthesis result alongside the audio. The provided source does not define the metadata fields or the exact value returned when this setting is disabled.
TTS WebUI StyleTTS2 Output Parameters:
audio
AUDIO. This is the speech audio returned through the node’s result handling, intended for use by downstream audio-capable nodes. The node requests a WAV-format response from the service, but the provided source does not specify the AUDIO value’s sample rate, channel count, or duration; those depend on the response and result handling.
wav_path
STRING. This is the file-path output supplied by result handling. It is relevant when you enable also_save_wav and need to locate the saved WAV. Because the provided source does not show the result-handling implementation, it does not establish what this string contains when saving is disabled or how the path is constructed.
metadata_json
STRING. This is the metadata output supplied by result handling, intended to carry metadata in JSON text form when return_metadata is enabled. It can help you inspect information associated with a generated result, but the available fields and the value returned when metadata is disabled are not defined in the provided source.
TTS WebUI StyleTTS2 Usage Tips:
- Start with a short, clearly punctuated line of
textand the default synthesis settings. This makes it easier to confirm that yourapi_baseand, if needed,api_keywork before submitting a longer passage. - Change one of
alpha,beta,diffusion_steps, orembedding_scaleat a time while keeping the text unchanged. This gives you a more useful comparison without assuming that a particular setting has the same audible effect on every service. - Keep
timeout_secat its 120-second default initially. If an otherwise working service repeatedly takes longer to respond, increase it within the supported range; if you want stalled requests to fail sooner, decrease it. - Enable
also_save_wavwhen your workflow needs an audio file on disk, and setsave_prefixto a name that helps you identify the take. Leavereturn_metadataenabled when you need to inspect the accompanying result information. - Leave
channels_firstenabled unless a downstream audio node expects another arrangement. If audio is rejected downstream, check that node’s channel-format requirements before changing this setting.
TTS WebUI StyleTTS2 Common Errors and Solutions:
No response or connection error
- Explanation: The node sends a request to
api_base; a connection error may mean the address is incorrect, the service is not running, or it cannot be reached. The provided node source does not define the exact error message. - Solution: Check the service address, confirm the service is running and reachable, and retry with a short text sample.
Unauthorized or authentication failed
- Explanation: A service that requires credentials may reject an empty or incorrect
api_key. The exact message depends on that service. - Solution: Confirm that the service requires a key, then enter a valid one in
api_keyand check that it has access to the requested service.
Request timed out
- Explanation: The service did not complete the request within
timeout_sec. This can happen when it is slow or unavailable; the exact timeout message depends on the request handling. - Solution: Try shorter text, check that the service is responding, or increase
timeout_secwithin its 1–600 second range.
Bad request or unsupported model
- Explanation: The node sends a request identifying the model as
styletts2and requesting a WAV response. A service that does not accept this request may reject it; its error wording is not defined here. - Solution: Confirm that your endpoint supports this node’s StyleTTS2 request format. Check the service’s own documentation or logs for the rejected field.
Invalid parameter value
- Explanation: A setting outside the node’s declared range may be rejected by the interface or the service. The node declares ranges for
alpha,beta,diffusion_steps,embedding_scale, andtimeout_sec. - Solution: Return the affected setting to its documented range or default, then retry. If the value is within the node’s range but the service still rejects it, follow the service’s supported values.
Unexpected response or audio conversion error
- Explanation: The node requests WAV audio, then passes the response to result handling. A response in an unexpected format, or an error response instead of audio, may prevent an AUDIO result. The exact error depends on the service and result handling.
- Solution: Check that the endpoint returns a valid response to this node’s request. Review the service’s logs, then retry with default settings and short text.
No saved WAV path
- Explanation:
wav_pathmay not point to a file whenalso_save_wavis False. The provided source does not define the exact path value in that case. - Solution: Enable
also_save_wav, run the node again, and inspectwav_path. If saving still fails, check the service or node environment for file-writing errors.
Missing or unusable metadata
- Explanation: Metadata may not be available when
return_metadatais False, and the provided source does not guarantee particular JSON fields. - Solution: Enable
return_metadataand generate a new result. Inspect the returned text before depending on a specific field in a downstream workflow.
