deepslate-pipecat package provides an LLMService implementation for the Pipecat framework, enabling seamless integration with Deepslate’s unified voice AI infrastructure.
This plugin is in early development. We welcome contributions! See the GitHub repository to get involved.
Prerequisites
- A Deepslate account with API credentials
- Python 3.11+
- A Pipecat-compatible transport (e.g. Daily.co, Twilio, generic WebSocket)
- (Optional) ElevenLabs API key for server-side TTS
Installation
Environment Variables
Set up your credentials as environment variables:| Variable | Required | Description |
|---|---|---|
DEEPSLATE_VENDOR_ID | Yes | Your Deepslate vendor ID |
DEEPSLATE_ORGANIZATION_ID | Yes | Your Deepslate organization ID |
DEEPSLATE_API_KEY | Yes | Your Deepslate API key |
ELEVENLABS_API_KEY | No | ElevenLabs API key for server-side TTS |
ELEVENLABS_VOICE_ID | No | ElevenLabs voice ID |
ELEVENLABS_MODEL_ID | No | ElevenLabs model (e.g., eleven_turbo_v2) |
Quick Start
Configuration Reference
DeepslateOptions
DeepslateOptions
The main configuration class for connecting to the Deepslate API. Use
DeepslateOptions.from_env() to load credentials from environment variables, with optional overrides.| Parameter | Type | Default | Description |
|---|---|---|---|
vendor_id | str | env: DEEPSLATE_VENDOR_ID | Your Deepslate vendor ID |
organization_id | str | env: DEEPSLATE_ORGANIZATION_ID | Your Deepslate organization ID |
api_key | str | env: DEEPSLATE_API_KEY | Your Deepslate API key |
base_url | str | https://app.deepslate.eu | Base URL for the Deepslate API |
system_prompt | str | "You are a helpful assistant." | System prompt for the model |
ws_url | str | None | None | Direct WebSocket URL (bypasses standard URL construction, useful for local testing) |
max_retries | int | 3 | Maximum reconnection attempts before emitting an ErrorFrame |
VAD Configuration
VAD Configuration
Pass a
DeepslateVadConfig to DeepslateRealtimeLLMService to tune server-side Voice Activity Detection.| Parameter | Type | Default | Description |
|---|---|---|---|
confidence_threshold | float | 0.5 | Minimum confidence to consider audio as speech (0.0–1.0) |
min_volume | float | 0.01 | Minimum volume threshold (0.0–1.0) |
start_duration_ms | int | 200 | Duration of speech required to detect speech start (ms) |
stop_duration_ms | int | 500 | Duration of silence required to detect speech end (ms) |
backbuffer_duration_ms | int | 1000 | Audio buffered before speech detection triggers (ms) |
ElevenLabsTtsConfig
ElevenLabsTtsConfig
Configure server-side text-to-speech with ElevenLabs via Deepslate.
Use
| Parameter | Type | Description |
|---|---|---|
api_key | str | ElevenLabs API key (env: ELEVENLABS_API_KEY) |
voice_id | str | Voice ID (env: ELEVENLABS_VOICE_ID) |
model_id | str | None | Model ID, e.g., eleven_turbo_v2 (env: ELEVENLABS_MODEL_ID) |
ElevenLabsTtsConfig.from_env() to create a config from environment variables.Features
Real-time Voice Streaming
Low-latency bidirectional PCM audio streaming over WebSockets for natural conversations
Server-side VAD
Voice activity detection handled server-side for reliable, configurable speech detection
Function Calling
Full tool/function calling support using OpenAI JSON schema format with async handlers
ElevenLabs TTS
Server-side text-to-speech with automatic interruption handling
Automatic Reconnection
Exponential-backoff reconnection with a configurable retry limit
Transport Agnostic
Works with any Pipecat transport: Daily.co, Twilio, generic WebSocket, and more
Function Calling
Define tools in OpenAI JSON schema format, register async handlers on the service, and push the definitions into the pipeline before it starts:Transport Examples
The Deepslate service is transport-agnostic. Swap the transport to suit your deployment.Daily.co (WebRTC)
Daily.co (WebRTC)
Twilio
Twilio
Generic WebSocket
Generic WebSocket
Contributing
This plugin is open source and we welcome contributions. Visit the GitHub repository to:- Report issues
- Submit pull requests
- Request features