> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepslate.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Deepslate SDKs

> Official Python and Node.js SDKs for integrating Deepslate voice AI into your agent framework

Deepslate provides **official Python and Node.js/TypeScript SDKs** for connecting your voice AI application to the Deepslate Realtime API. All SDKs live in a single [open-source monorepo](https://github.com/deepslate-labs/deepslate-sdks) and share a common core within each language, giving you a consistent configuration model and feature set regardless of which agent framework or language you use.

## What Deepslate provides

Every SDK gives your application access to Deepslate's unified voice AI stack over a single WebSocket connection:

> [card] Speech-to-Speech Streaming
>
> Send raw PCM audio in, receive synthesized PCM audio out — all in real time

> [card] Server-side VAD
>
> Voice Activity Detection runs on the server, so you don't need a client-side VAD pipeline

> [card] LLM Inference
>
> Deepslate manages the inference lifecycle, including tool calling, context management, and interruption handling

> [card] ElevenLabs TTS
>
> Optional server-side text-to-speech with configurable voice, model, and regional endpoint

> [card] Deepslate Hosted TTS
>
> Server-side text-to-speech using Deepslate-hosted cloned voices — no external TTS provider credentials required.

## Packages

The monorepo publishes framework plugins for two languages. The **LiveKit** plugin is available in both Python and Node.js/TypeScript; the **Pipecat** plugin is Python-only. Each plugin pulls in its language's `core` package automatically — install only the plugin you need.

> [card] [deepslate-livekit (Python)](https://docs.deepslate.eu/livekit.md)
>
> `RealtimeModel` plugin for [LiveKit Agents](https://github.com/livekit/agents). Drop into any Python LiveKit Agents project with a one-line model swap.

> [card] [@deepslate-labs/livekit (Node.js)](https://docs.deepslate.eu/livekit-node.md)
>
> `RealtimeModel` plugin for the [LiveKit Agents](https://github.com/livekit/agents) Node framework. Same configuration model, written against the TypeScript API.

> [card] [deepslate-pipecat (Python)](https://docs.deepslate.eu/pipecat.md)
>
> `LLMService` plugin for [Pipecat](https://github.com/pipecat-ai/pipecat). Integrates with any Pipecat transport and the full frame-based pipeline architecture.

```bash LiveKit (Python) theme={null}
pip install deepslate-livekit
```

```bash LiveKit (Node.js) theme={null}
npm install @deepslate-labs/livekit
```

```bash Pipecat (Python) theme={null}
pip install deepslate-pipecat
```

View source on GitHub: [livekit (Python)](https://github.com/deepslate-labs/deepslate-sdks/tree/main/python/packages/livekit) · [livekit (Node.js)](https://github.com/deepslate-labs/deepslate-sdks/tree/main/node/packages/livekit) · [pipecat (Python)](https://github.com/deepslate-labs/deepslate-sdks/tree/main/python/packages/pipecat)

## Credentials

All packages read credentials from the same three environment variables:

```bash theme={null}
DEEPSLATE_VENDOR_ID=your_vendor_id
DEEPSLATE_ORGANIZATION_ID=your_organization_id
DEEPSLATE_API_KEY=your_api_key
```

Each configuration class (`DeepslateOptions`, `RealtimeModel`, etc.) accepts these as constructor arguments too, but environment variables are the recommended approach for keeping secrets out of your code.

> [!WARNING]
>
> Never expose these credentials to clients. All SDK packages are designed for **server-side use** only.

## Model selection

Every SDK connects to the platform's default Opal model unless you pin one with the `model` option or the `DEEPSLATE_MODEL` environment variable:

```bash theme={null}
DEEPSLATE_MODEL=opal-v2.1
```

```python LiveKit (Python) theme={null}
from deepslate.livekit import DeepslateModel, RealtimeModel

# opal-v2.1 is the current platform default. Pinning it keeps you on this model
# even if the default changes. See Available Models for other model ids.
llm = RealtimeModel(model=DeepslateModel.OPAL_V2_1)

# Equivalent, using the model id as a plain string:
# llm = RealtimeModel(model="opal-v2.1")
```

```ts LiveKit (Node.js) theme={null}
import { DeepslateModel, RealtimeModel } from "@deepslate-labs/livekit";

// opal-v2.1 is the current platform default. Pinning it keeps you on this model
// even if the default changes. See Available Models for other model ids.
const llm = new RealtimeModel({ model: DeepslateModel.OPAL_V2_1 });

// Equivalent, using the model id as a plain string:
// const llm = new RealtimeModel({ model: "opal-v2.1" });
```

```python Pipecat (Python) theme={null}
from deepslate.pipecat import DeepslateModel, DeepslateOptions, DeepslateRealtimeLLMService

# opal-v2.1 is the current platform default.
# See Available Models for other model ids.
llm = DeepslateRealtimeLLMService(
    options=DeepslateOptions.from_env(model=DeepslateModel.OPAL_V2_1),
)

# Equivalent, using the model id as a plain string:
# llm = DeepslateRealtimeLLMService(
#     options=DeepslateOptions.from_env(model="opal-v2.1"),
# )
```

See [Available Models](https://docs.deepslate.eu/opal.md#available-models) for the current list and how to request access to preview models.

## Core packages

Each language has a shared foundation that its plugins are built on — `deepslate-core` (Python) and `@deepslate-labs/core` (Node.js). It handles WebSocket connectivity, protobuf framing, session lifecycle, and exponential-backoff reconnection.

> [!NOTE]
>
> You **don't need to install the core package directly** when using the LiveKit or Pipecat plugins — they include it as a dependency. Install it only if you're building a **custom integration** outside of these frameworks.

```bash Python theme={null}
pip install deepslate-core
```

```bash Node.js theme={null}
npm install @deepslate-labs/core
```

The central building block is `DeepslateSession`, which manages the full protocol lifecycle. In Python it delivers events to a `DeepslateSessionListener` you subclass; in Node.js it is an event emitter you subscribe to with `session.on(...)`. The Python version:

```python theme={null}
from deepslate.core import (
    DeepslateOptions,
    DeepslateSession,
    DeepslateSessionListener,
)

class MyListener(DeepslateSessionListener):
    async def on_text_fragment(self, text: str) -> None:
        print(text, end="", flush=True)

    async def on_audio_chunk(
        self, pcm_bytes: bytes, sample_rate: int, channels: int, transcript: str | None
    ) -> None:
        # Forward audio to your output device or transport
        ...

    async def on_tool_call(self, call_id: str, name: str, params: dict) -> None:
        result = await dispatch_tool(name, params)
        await self.session.send_tool_response(call_id, result)

listener = MyListener()
session = DeepslateSession.create(
    DeepslateOptions.from_env(),
    listener=listener,
)
listener.session = session
session.start()
```

For the full `DeepslateSession` API — including all send methods and event callbacks — see the core source: [Python](https://github.com/deepslate-labs/deepslate-sdks/tree/main/python/packages/core) · [Node.js](https://github.com/deepslate-labs/deepslate-sdks/tree/main/node/packages/core).

## Repository

All packages are maintained in a single polyglot monorepo, split by language. The Python workspace is managed with [`uv`](https://docs.astral.sh/uv/); the Node.js workspace with [`pnpm`](https://pnpm.io/):

```
deepslate-sdks/
├── python/
│   ├── packages/
│   │   ├── core/      # deepslate-core — shared WebSocket client and session logic
│   │   ├── livekit/   # deepslate-livekit — LiveKit Agents plugin
│   │   └── pipecat/   # deepslate-pipecat — Pipecat plugin
│   └── pyproject.toml # uv workspace root
└── node/
    ├── packages/
    │   ├── core/      # @deepslate-labs/core — shared WebSocket client and session logic
    │   └── livekit/   # @deepslate-labs/livekit — LiveKit Agents plugin
    └── pnpm-workspace.yaml
```

Contributions are welcome. Before setting up a local development environment, make sure you have:

* [Git](https://git-scm.com/)
* [`uv`](https://docs.astral.sh/uv/) for the Python workspace
* [`pnpm`](https://pnpm.io/) and Node.js 18+ for the Node.js workspace

Then clone the repository and install dependencies for the workspace you want:

```bash Python theme={null}
git clone https://github.com/deepslate-labs/deepslate-sdks.git
cd deepslate-sdks/python
uv sync --all-packages
```

```bash Node.js theme={null}
git clone https://github.com/deepslate-labs/deepslate-sdks.git
cd deepslate-sdks/node
pnpm install
```

> [card] [LiveKit Plugin (Python)](https://docs.deepslate.eu/livekit.md)
>
> Full configuration reference, features, and examples

> [card] [LiveKit Plugin (Node.js)](https://docs.deepslate.eu/livekit-node.md)
>
> TypeScript configuration reference, features, and examples

> [card] [Pipecat Plugin (Python)](https://docs.deepslate.eu/pipecat.md)
>
> Full configuration reference, features, and frame reference

> [card] [GitHub Repository](https://github.com/deepslate-labs/deepslate-sdks)
>
> Source code, issues, and contributions

> [card] [API Reference](https://docs.deepslate.eu/api-reference/realtime.md)
>
> WebSocket message schemas and protocol documentation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.