[Text] to speech
The Text-to-Speech operation converts a provided text into an audio file.

Input Fields
Module Configuration
This refers to the MAC Whisperer Configuration set up in the Getting Started section.
General Operation Fields
- Text to convert: The text to convert in to audio.
- Path to the output file: The complete path to the output file (to be generated). If file exists, it will be overwritten.
Additional Properties
- Model Name: Indicates the model to be used (default is
tts-1). - Voice: Indicates the voice to be used (default is
alloy). - Speed: Indicates the speed of the playback (default is
1.0). - Response format: Indicates the output file format (default is
mp3).
XML Configuration
Below is the XML configuration for this operation:
<
whisperer:text-to-speech
doc:name="Text to speech"
doc:id="a3fb05f7-d093-43c0-891e-c8095ff260b8"
config-ref="OpenAI"
textToConvert="#[payload.text]"
pathToOutputFile="/Users/amir.khan/Downloads/audio/speech.mp3"
/>Output Field
This operation responds with a json payload.
Example Output
This output has been converted to JSON.
{
"outputDirectory": "/Users/amir.khan/Downloads/audio/speech.mp3"
}- outputDirectory: The output directory path to the output file.