OpenAI Text to Speech
Convert text to audio using OpenAI's advanced Text to Speech models for various applications.
What is OpenAI Text to Speech?

OpenAI Text to Speech allows you to convert text into audio using OpenAI's sophisticated Text to Speech models. This node needs an OpenAI API Key and a text prompt as inputs. You can choose from different models and voices to tailor the audio output to your needs. The output can be in various audio formats such as MP3, OPUS, AAC, FLAC, WAV, and PCM.
How to use it?
To effectively use OpenAI Text to Speech, follow these steps:
-
Add OpenAI Text to Speech:
- Drag and drop OpenAI Text to Speech into your workflow canvas.
-
Configure Input Parameters:
- Credentials: Select your OpenAI Credentials.
- Model Name: Select a model from the available options (e.g., 'Text to Speech 1', 'Text to Speech 1 HD').
- Voice: Choose a voice from the available options (e.g., 'Alloy', 'Echo', 'Fable', 'Onyx', 'Nova', 'Shimmer').
- Audio Output: Select the desired audio format for the output (e.g., MP3, OPUS, AAC, FLAC, WAV, PCM).
-
Connect Input Anchors:
- Prompt Text: Connect a node that provides the text prompt input. For example, you can use a Text Input to provide the text.
-
Set Output Anchors:
- Connect a node which is able to store or the audio like a File Writer or do some further processing.
Example of usage
This example demonstrates how to set up a workflow that converts a text prompt into an MP3 audio file using the OpenAI Text to Speech.

Example Task: Text to Speech Conversion
Objective: Convert a given text into an audio file using OpenAI's Text to Speech service.
Step-by-Step Setup
-
Add a Text Input:
- Drag and drop a Text Input into the canvas.
- Configure the template with the desired text (e.g., "Create a list of ideas for my startup").
-
Add the OpenAI Text to Speech:
- Drag and drop the OpenAI Text to Speech into the canvas.
- Select your OpenAI Credentials.
- Select the desired model (e.g., 'Text to Speech 1').
- Choose a voice (e.g., 'Alloy').
- Select 'MP3' as the audio output format.
-
Connect Text Input to OpenAI Text to Speech:
- Connect the output anchor of Text Input (prompt) to the input anchor of the OpenAI Text to Speech (Prompt Text).
-
Add an Output:
- Drag and drop a File Writer to the canvas to store the output.
- Connect the audio output of the OpenAI Text to Speech to the input anchor of the File Writer.
Additional Information
For the best results with the OpenAI Text to Speech node, ensure that your API Key is valid and has the necessary permissions. Additionally, selecting the appropriate model and voice can significantly impact the quality of the generated audio. Refer to the OpenAI API documentation for further details on available models and voices.
By following these steps, you can effectively convert text to speech using OpenAI's Text to Speech services within your workflow.