Overview
OpenAITTSService
provides high-quality text-to-speech synthesis using OpenAI’s TTS API with multiple voice models including traditional TTS models and advanced GPT-based models. The service outputs 24kHz PCM audio with streaming capabilities for real-time applications.
OpenAI TTS API Reference
Pipecat’s API methods for OpenAI TTS integration
Example Implementation
Complete example with voice customization
OpenAI Documentation
Official OpenAI TTS API documentation
Voice Samples
Listen to available voice options
Installation
To use OpenAI services, install the required dependencies:Prerequisites
OpenAI Account Setup
Before using OpenAI TTS services, you need:- OpenAI Account: Sign up at OpenAI Platform
- API Key: Generate an API key from your API keys page
- Voice Selection: Choose from available voice options (alloy, echo, fable, onyx, nova, shimmer, etc.)
Required Environment Variables
OPENAI_API_KEY
: Your OpenAI API key for authentication