> ## Documentation Index
> Fetch the complete documentation index at: https://daily-docs-source-analytics-user-turn-strategies.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Deepdub

> Text-to-speech service implementation using Deepdub AI's streaming WebSocket API

export const CommunityMaintained = ({maintainer, maintainerUrl, repo}) => <Note>
    <strong>Community-maintained integration.</strong> This service is built and
    maintained by{" "}
    <a href={maintainerUrl} target="_blank" rel="noreferrer">
      {maintainer}
    </a>
    . Pipecat does not test or officially support it. Please report issues and
    request changes on the{" "}
    <a href={repo} target="_blank" rel="noreferrer">
      source repository
    </a>
    . Learn more about{" "}
    <a href="/api-reference/server/services/community-integrations">
      community integrations
    </a>
    .
  </Note>;

<CommunityMaintained maintainer="deepdub-ai" maintainerUrl="https://github.com/deepdub-ai" repo="https://github.com/deepdub-ai/pipecat" />

## Overview

`DeepdubTTSService` generates speech from text using [Deepdub AI](https://deepdub.ai/)'s
real-time streaming WebSocket API. It extends Pipecat's `InterruptibleTTSService`
and pushes `TTSAudioRawFrame` audio into the pipeline, with support for multiple
models (`dd-etts-2.5`, `dd-etts-3.0`), voice customization, and accent control.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/deepdub-ai/pipecat">
    Source code, examples, and issues for the Deepdub TTS integration
  </Card>

  <Card title="PyPI Package" icon="cube" href="https://pypi.org/project/pipecat-deepdub-tts/">
    The `pipecat-deepdub-tts` package on PyPI
  </Card>

  <Card title="Deepdub AI" icon="book" href="https://deepdub.ai/">
    Learn more about Deepdub AI and sign up for an API key
  </Card>
</CardGroup>

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-deepdub-tts
```

## Prerequisites

### Deepdub Account Setup

Before using the Deepdub TTS service, you need:

1. **Deepdub Account**: Sign up at [Deepdub AI](https://deepdub.ai/)
2. **API Key**: Obtain your API key from your Deepdub account
3. **Voice Prompt ID**: A voice prompt ID to use for synthesis

### Required Environment Variables

* `DEEPDUB_API_KEY`: Your Deepdub API key for authentication
* `DEEPDUB_VOICE_ID`: The voice prompt ID used for synthesis

## Configuration

<ParamField path="api_key" type="str" required>
  Deepdub API key for authentication.
</ParamField>

<ParamField path="voice_id" type="str" required>
  Voice prompt ID to use for synthesis.
</ParamField>

<ParamField path="model" type="str" default="dd-etts-2.5">
  TTS model name (e.g. `"dd-etts-2.5"`, `"dd-etts-3.0"`).
</ParamField>

<ParamField path="sample_rate" type="int" default="16000">
  Audio sample rate in Hz. Valid values: `8000`, `16000`, `22050`, `24000`,
  `44100`, `48000`.
</ParamField>

<ParamField path="params" type="DeepdubTTSService.InputParams" default="None">
  Optional voice customization parameters. See [InputParams](#inputparams)
  below.
</ParamField>

### InputParams

Optional voice customization passed via the `params` constructor argument using
`DeepdubTTSService.InputParams(...)`.

| Parameter            | Type    | Default   | Description                                                                |
| -------------------- | ------- | --------- | -------------------------------------------------------------------------- |
| `locale`             | `str`   | `"en-US"` | Language locale for synthesis.                                             |
| `temperature`        | `float` | `None`    | Controls output variability.                                               |
| `variance`           | `float` | `None`    | Controls variance in generated speech.                                     |
| `tempo`              | `float` | `None`    | Speech tempo multiplier.                                                   |
| `prompt_boost`       | `bool`  | `None`    | Enable prompt boosting for improved quality.                               |
| `accent_base_locale` | `str`   | `None`    | Base locale for accent control. All three accent params required together. |
| `accent_locale`      | `str`   | `None`    | Target accent locale.                                                      |
| `accent_ratio`       | `float` | `None`    | Accent blending ratio (0.0 to 1.0).                                        |

<Note>
  Available parameters and defaults are defined by the integration. See the
  [source repository](https://github.com/deepdub-ai/pipecat) for the
  authoritative, up-to-date list.
</Note>

## Usage

```python theme={null}
import os
from pipecat_deepdub_tts import DeepdubTTSService

tts = DeepdubTTSService(
    api_key=os.getenv("DEEPDUB_API_KEY"),
    voice_id=os.getenv("DEEPDUB_VOICE_ID"),
    model="dd-etts-2.5",
    sample_rate=24000,
    params=DeepdubTTSService.InputParams(
        locale="en-US",
        temperature=0.7,
        tempo=1.1,
        prompt_boost=True,
    ),
)

# ... add tts to your pipeline, e.g. Pipeline([llm, tts, ...])
```

## Compatibility

Tested with Pipecat v0.0.97. Check the [source
repository](https://github.com/deepdub-ai/pipecat) for the latest tested version
and changelog.
