# Text To Speech

**Introduction**

The "Text to Speech" step utilizes OpenAI's advanced text-to-speech (TTS) technology to convert text into lifelike spoken audio. This step is invaluable for creating spoken word content from written text, enabling automated voice announcements, etc.

**Configuration**

* **API Token**: Your OpenAI API token, essential for accessing the text-to-speech service. This token must be valid and possess the necessary permissions to use the TTS feature.
* **Model**: The specific TTS model to use for converting text into speech. By default, this is set to "tts-1", but OpenAI may offer various models with different voices, accents, or languages.
* **Voice**: The voice identifier to be used for generating the speech. The default is set to "alloy", reflecting a particular voice style or character available within the chosen model.
* **Input**: The textual content you wish to convert into speech.

**Outputs**

* **File**: An audio file output variable containing the generated speech. This file can be integrated into further steps of your automation, used for playback in various contexts, for example with [Play Audio](/modules/discord/steps/play-audio.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexy.bot/modules/openai/steps/text-to-speech.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
