Skip to main content
OpenAI is a text-to-speech plugin. It synthesizes the LLM’s reply into the agent’s voice using OpenAI’s TTS models. It occupies the pipeline’s tts slot.

Setup

Set your OpenAI API key in the worker environment. Generate a key from the OpenAI dashboard:

Usage

Import the plugin and pass it to the pipeline’s tts slot.

Speed control

Use speed to adjust the speaking rate. The value is a multiplier in the range 0.25 - 4.0; leaving it unset uses the provider default of 1.0:
Python

Parameters

Constructor parameters for the Python SDK (OpenAITTS).

Import paths

The synthesized audio is streamed back to the caller as the final stage of the pipeline.