Overview
Google Cloud Text-to-Speech provides high-quality speech synthesis with two service implementations:GoogleTTSService
(WebSocket-based) for streaming with the lowest latency, and GoogleHttpTTSService
(HTTP-based) for simpler integration. GoogleTTSService
is recommended for real-time applications.
Google TTS API Reference
Pipecat’s API methods for Google Cloud TTS integration
Example Implementation
Complete example with Chirp 3 HD voice
Google Cloud Documentation
Official Google Cloud Text-to-Speech documentation
Voice Gallery
Browse available voices and languages
Installation
To use Google services, install the required dependencies:Prerequisites
Google Cloud Setup
Before using Google Cloud TTS services, you need:- Google Cloud Account: Sign up at Google Cloud Console
- Project Setup: Create a project and enable the Text-to-Speech API
- Service Account: Create a service account with TTS permissions
- Authentication: Set up credentials via service account key or Application Default Credentials
Required Environment Variables
GOOGLE_APPLICATION_CREDENTIALS
: Path to your service account key file (recommended)- Or use Application Default Credentials for cloud deployments