Overview
LMNTTTSService provides real-time text-to-speech synthesis through LMNT’s WebSocket-based streaming API optimized for conversational AI. The service offers ultra-low latency with high-quality voice models and supports multiple languages with automatic interruption handling.
LMNT TTS API Reference
Pipecat’s API methods for LMNT TTS integration
Example Implementation
Complete example with voice synthesis
LMNT Documentation
Official LMNT streaming speech API documentation
Voice Library
Browse and create custom voices
Installation
To use LMNT services, install the required dependencies:Prerequisites
LMNT Account Setup
Before using LMNT TTS services, you need:- LMNT Account: Sign up at LMNT Console
- API Key: Generate an API key from your account dashboard
- Voice Selection: Choose from available voice models or create custom voices
Required Environment Variables
LMNT_API_KEY: Your LMNT API key for authentication
Configuration
LmntTTSService
LMNT API key for authentication.
ID of the voice to use for synthesis.
LMNT TTS model to use.
Language for synthesis. Supports multiple languages including German, English, Spanish, French, Hindi, and more.
Output audio sample rate in Hz. When
None, uses the pipeline’s configured sample rate.Usage
Basic Setup
With Language Configuration
Notes
- WebSocket-based streaming: LMNT uses a persistent WebSocket connection for low-latency audio synthesis with automatic reconnection.
- Class name: The Python class is
LmntTTSService(note the lowercase ‘mnt’).
Event Handlers
LMNT TTS supports the standard service connection events:| Event | Description |
|---|---|
on_connected | Connected to LMNT WebSocket |
on_disconnected | Disconnected from LMNT WebSocket |
on_connection_error | WebSocket connection error occurred |