Skip to main content
The deepslate-pipecat package provides a DeepslateRealtimeLLMService implementation for the Pipecat framework, enabling seamless integration with Deepslate’s unified voice AI infrastructure.
This plugin lives in the deepslate-sdks monorepo. We welcome contributions — feel free to open issues or pull requests there.

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:
Never expose your Deepslate or ElevenLabs API keys to clients. This plugin is for server-side use only.

Quick Start

Configuration Reference

The main configuration class for connecting to the Deepslate API. Use DeepslateOptions.from_env() to load credentials from environment variables, with optional keyword overrides.
Pass a VadConfig to DeepslateRealtimeLLMService to tune server-side Voice Activity Detection. Disable client-side VAD on your transport since Deepslate handles it.
Use a voice cloned and hosted within Deepslate — no external TTS provider credentials required. Pass an instance to DeepslateRealtimeLLMService(tts_config=...) to enable PCM audio output.HostedTtsMode values:
Configure server-side text-to-speech with ElevenLabs via Deepslate. Pass an instance to DeepslateRealtimeLLMService(tts_config=...) to enable PCM audio output.Use ElevenLabsTtsConfig.from_env() to create a config from environment variables.ElevenLabsVoiceSettingsConfig — fine-grained control over the synthesized voice:
Server-side TTS enables automatic interruption handling. When the user interrupts, Deepslate tracks exactly what was spoken and truncates the context accordingly. Without server-side TTS, the service emits LLMTextFrame for a downstream Pipecat TTS service, but this interruption context tracking will not be available.

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 TTS with regional endpoints and fine-grained voice settings

Low Latency Mode

Hosted voice TTS supports a low latency mode for fastest possible response at the cost of some output quality

Direct Speech

Speak text directly via TTS without routing through the LLM

Conversation Queries

Run one-shot side-channel inference without affecting the main conversation

Chat History Export

Export the full structured conversation history on demand

Dynamic Context Injection

Inject user or system messages mid-conversation via LLMMessagesAppendFrame

Automatic Reconnection

Exponential-backoff reconnection with a configurable retry limit

Transport Agnostic

Works with any Pipecat transport: Daily.co, Twilio, generic WebSocket, and more

Session Initialized Frame

DeepslateRealtimeLLMService emits a DeepslateSessionInitializedFrame exactly once, when the WebSocket session is fully initialized and ready to accept messages.

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:

Dynamic Context Injection

Inject messages into the live conversation context without restarting the session. This is useful for passing user profile data, injecting tool results from external systems, or priming the model with background context.
Use LLMMessagesUpdateFrame to resync the full context and optionally trigger an immediate model reply.

Direct Speech

Push a DeepslateDirectSpeechFrame to synthesize and play text directly — bypassing the LLM entirely. Useful for scripted prompts, confirmations, or fallback messages.
Set include_in_history=False to speak without adding the text to the conversation context — ideal for system-level announcements.

Conversation Queries

A DeepslateConversationQueryFrame runs a one-shot inference call on a side channel. The result arrives as a DeepslateConversationQueryResultFrame and does not affect the main conversation history or trigger any audio output.
This is useful for background analysis, logging summaries, or deciding on the next action without affecting the user-facing conversation.

Chat History Export

Push a DeepslateExportChatHistoryFrame to request the full conversation history. The result arrives as a DeepslateChatHistoryFrame downstream in the pipeline.
Each ChatMessageDict has role, delivery_status, ephemeral, and a content list of typed blocks (text, input_audio, tool_call, tool_result, and more).

Custom Frames Reference

In addition to standard Pipecat frames, deepslate-pipecat exposes the following frames for controlling and observing Deepslate-specific behaviour.

Input Frames (push into the pipeline)

Output Frames (emitted by the service)

Transport Examples

The Deepslate service is transport-agnostic. Swap the transport to suit your deployment.

Contributing

This plugin is open source. Visit the deepslate-sdks monorepo to:
  • Report issues
  • Submit pull requests
  • Request features

Next Steps

API Reference

Full message schemas and configuration options

Pipecat Docs

Pipecat framework documentation

GitHub Repository

Source code, issues, and contributions