> ## 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.

# Uplift AI

> Speech-to-text service implementation using Uplift AI's Urdu transcription 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-stt" />

## Overview

`UpliftAISTTService` transcribes audio into text using [Uplift AI](https://upliftai.org)'s
Scribe speech-to-text API, optimized for the Urdu language with optional
domain-specific optimization. It is a `SegmentedSTTService` built on Uplift AI's
HTTP transcription endpoint.

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

  <Card title="Uplift AI" icon="book" href="https://upliftai.org">
    Learn more about Uplift AI's speech services
  </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-stt.git
```

## Prerequisites

### Uplift AI Account Setup

Before using the Uplift AI STT service, you need:

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

### Required Environment Variables

* `UPLIFT_API_KEY`: Your Uplift AI API key. Falls back to this environment
  variable if `api_key` is not passed to the constructor.

## Configuration

<ParamField path="api_key" type="str" default="None">
  Uplift AI API key. Falls back to the `UPLIFT_API_KEY` environment variable if
  not provided.
</ParamField>

<ParamField path="base_url" type="str" default="https://api.upliftai.org/v1">
  Base URL for the Uplift AI API.
</ParamField>

<ParamField path="sample_rate" type="int" default="None">
  Audio sample rate in Hz. If not provided, the pipeline's sample rate is used.
</ParamField>

<ParamField path="model" type="str" default="scribe">
  Model to use for transcription. Options: `"scribe"` (full accuracy, 40
  credits/min) or `"scribe-mini"` (cost-effective, 20 credits/min).
</ParamField>

<ParamField path="domain" type="str" default="None">
  Optional domain-specific optimization. Options: `"phone-commerce"` or
  `"farming"`.
</ParamField>

<ParamField path="params" type="UpliftAISTTService.InputParams" default="None">
  Alternative parameter configuration. See [InputParams](#inputparams) below.
</ParamField>

### InputParams

Advanced configuration passed via the `params` constructor argument using
`UpliftAISTTService.InputParams(...)`.

| Parameter  | Type  | Default    | Description                                                        |
| ---------- | ----- | ---------- | ------------------------------------------------------------------ |
| `model`    | `str` | `"scribe"` | Model to use. Options: `"scribe"` or `"scribe-mini"`.              |
| `language` | `str` | `"ur"`     | Transcription language. Currently only Urdu (`"ur"`) is supported. |
| `domain`   | `str` | `None`     | Optional domain optimization: `"phone-commerce"` or `"farming"`.   |

<Note>
  See the [source
  repository](https://github.com/havkerboi123/pipecat-upliftai-stt) for the
  authoritative, up-to-date configuration options.
</Note>

## Usage

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

stt = UpliftAISTTService(
    api_key=os.getenv("UPLIFT_API_KEY"),
    model="scribe",
    domain="phone-commerce",  # optional
)

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

You can also switch the model or domain at runtime:

```python theme={null}
await stt.set_model("scribe-mini")
await stt.set_domain("farming")
await stt.set_domain(None)  # disable domain optimization
```

## Compatibility

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