Overview
Azure Cognitive Services provides high-quality text-to-speech synthesis with two service implementations:AzureTTSService
(WebSocket-based) for real-time streaming with low latency, and AzureHttpTTSService
(HTTP-based) for batch synthesis. AzureTTSService
is recommended for interactive applications requiring streaming capabilities.
Azure TTS API Reference
Pipecat’s API methods for Azure TTS integration
Example Implementation
Complete example with streaming synthesis
Azure Speech Documentation
Official Azure Speech Services documentation
Voice Gallery
Browse available voices and languages
Installation
To use Azure services, install the required dependencies:Prerequisites
Azure Account Setup
Before using Azure TTS services, you need:- Azure Account: Sign up at Azure Portal
- Speech Service: Create a Speech resource in your Azure subscription
- API Key and Region: Get your subscription key and service region
- Voice Selection: Choose from available voices in the Voice Gallery
Required Environment Variables
AZURE_SPEECH_API_KEY
: Your Azure Speech service API keyAZURE_SPEECH_REGION
: Your Azure Speech service region (e.g., “eastus”)