Visit ComfyUI Online for ready-to-use ComfyUI environment
Convert text to speech using OpenAI models, supporting various voices for high-quality audio synthesis.
The openai_tts
node is designed to convert text into speech using OpenAI's advanced text-to-speech models. This node allows you to input a string of text and receive an audio file of the spoken version of that text. It supports various models and voices, providing flexibility in the type of speech output you can generate. This functionality is particularly useful for creating voiceovers, narrations, or any application where converting text to natural-sounding speech is required. The node integrates seamlessly with OpenAI's API, ensuring high-quality and reliable speech synthesis.
This parameter is a boolean that enables or disables the text-to-speech functionality. When set to True
, the node will process the input text and generate speech. If set to False
, the node will not perform any action. The default value is True
.
This parameter accepts a string of text that you want to convert into speech. The text provided here will be synthesized into an audio file. There are no specific minimum or maximum values for the length of the text, but it should be within reasonable limits for processing.
This parameter allows you to select the text-to-speech model to be used. The available options are tts-1
and tts-1-hd
, with tts-1
being the default model. The choice of model can affect the quality and characteristics of the generated speech.
This parameter lets you choose the voice for the speech synthesis. Available options include alloy
, echo
, fable
, onyx
, nova
, and shimmer
, with alloy
being the default voice. Each voice has unique characteristics, allowing you to select the one that best fits your needs.
This optional parameter specifies the base URL for the OpenAI API. The default value is https://api.openai.com/v1/
. This can be customized if you are using a different endpoint for the API.
This optional parameter is for providing your OpenAI API key. The default value is a placeholder sk-XXXXX
. You need to replace this with your actual API key to authenticate requests to the OpenAI API.
The output parameter audio
is the path to the generated audio file. This file contains the speech synthesized from the input text. The audio file is saved in the audio
directory within the current working directory, and the filename is a timestamped .mp3
file.
is_enable
parameter is set to True
to activate the text-to-speech functionality.model_name
and voice
to match the desired quality and style of the speech output.api_key
parameter to authenticate your requests.base_url
if you are using a different endpoint for the OpenAI API.api_key
parameter or have it set in your environment variables.input_string
parameter is empty or not provided.input_string
parameter to be converted into speech.base_url
parameter is correctly set to the OpenAI API endpoint.© Copyright 2024 RunComfy. All Rights Reserved.