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

# Uplift AI

> Text-to-speech service implementation using Uplift AI's synthesis 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="havkerboi123" maintainerUrl="https://github.com/havkerboi123" repo="https://github.com/havkerboi123/pipecat-upliftai-tts" />

## Overview

`UpliftHttpTTSService` converts text into speech using
[Uplift AI's](https://upliftai.org) HTTP text-to-speech API. It provides
high-quality, low-latency synthesis optimized for conversational AI in local
languages such as Urdu, with multiple voice options and audio formats.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/havkerboi123/pipecat-upliftai-tts">
    Source code, examples, and issues for the Uplift AI integration
  </Card>

  <Card title="Uplift AI" icon="book" href="https://upliftai.org">
    Learn more about Uplift AI's text-to-speech service
  </Card>

  <Card title="API Keys" icon="key" href="https://platform.upliftai.org/studio/api-keys">
    Create and manage your Uplift AI API keys
  </Card>
</CardGroup>

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`.
It is not yet published to PyPI, so install it directly from GitHub:

```bash theme={null}
uv pip install git+https://github.com/havkerboi123/pipecat-upliftai-tts.git
```

## Prerequisites

### Uplift AI Account Setup

Before using the Uplift AI text-to-speech service, you need:

1. **Uplift AI Account**: Sign up at [Uplift AI](https://upliftai.org)
2. **API Key**: Generate an API key from the
   [API Keys page](https://platform.upliftai.org/studio/api-keys) (format:
   `sk_api_...`)

### Required Environment Variables

* `UPLIFT_API_KEY`: Your Uplift AI API key for authentication

## Configuration

<ParamField path="api_key" type="str" required>
  Uplift AI API key for authentication (format: `sk_api_...`).
</ParamField>

<ParamField path="base_url" type="str" default="https://api.upliftai.org/v1/synthesis/text-to-speech">
  Base URL for the Uplift TTS API endpoint.
</ParamField>

<ParamField path="voice_id" type="str" default="v_8eelc901">
  Uplift voice identifier. Available voices: `v_8eelc901` (Info/Edu),
  `v_kwmp7zxt` (Gen Z), `v_yypgzenx` (Dada Jee), `v_30s70t3a` (Nostalgic News).
</ParamField>

<ParamField path="output_format" type="str" default="WAV_22050_16">
  Audio output format. Available formats: `WAV_22050_16`, `WAV_22050_32`,
  `MP3_22050_32`, `MP3_22050_64`, `MP3_22050_128`, `OGG_22050_16`,
  `ULAW_8000_8`.
</ParamField>

<ParamField path="sample_rate" type="int" default="22050">
  Audio sample rate in Hz.
</ParamField>

<ParamField path="aiohttp_session" type="aiohttp.ClientSession" default="None">
  Optional shared aiohttp session used for API requests. If not provided, the
  service creates and manages its own session.
</ParamField>

<ParamField path="params" type="UpliftHttpTTSService.InputParams" default="None">
  Optional input parameters for voice and output-format overrides. See
  [InputParams](#inputparams) below.
</ParamField>

### InputParams

Optional configuration passed via the `params` constructor argument using
`UpliftHttpTTSService.InputParams(...)`.

| Parameter       | Type            | Default          | Description                         |
| --------------- | --------------- | ---------------- | ----------------------------------- |
| `voice_id`      | `Optional[str]` | `None`           | Optional default voice ID override. |
| `output_format` | `Optional[str]` | `"WAV_22050_16"` | Audio output format.                |

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

## Usage

```python theme={null}
import os
import aiohttp
from pipecat.pipeline.pipeline import Pipeline
from pipecat_upliftai import UpliftHttpTTSService

async with aiohttp.ClientSession() as session:
    llm = ...  # Your LLM service
    stt = ...  # Your STT service

    tts = UpliftHttpTTSService(
        aiohttp_session=session,
        api_key=os.getenv("UPLIFT_API_KEY"),
        voice_id="v_8eelc901",  # Info/Edu voice
        output_format="WAV_22050_16",
    )

    pipeline = Pipeline([
        transport.input(),               # audio/user input
        stt,                             # speech to text
        context_aggregator.user(),       # add user text to context
        llm,                             # LLM generates response
        tts,                             # Uplift TTS synthesis
        transport.output(),              # stream audio back to user
        context_aggregator.assistant(),  # store assistant response
    ])
```

You can also switch voice or output format at runtime:

```python theme={null}
await tts.set_voice_id("v_kwmp7zxt")        # Switch to Gen Z voice
await tts.set_output_format("MP3_22050_128")
```

## Compatibility

Tested with Pipecat v0.0.86 and later. Check the [source
repository](https://github.com/havkerboi123/pipecat-upliftai-tts) for the latest
tested version and changelog.
