Skip to main content

Overview

UpliftAISTTService transcribes audio into text using Uplift AI’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.

Source Repository

Source code, examples, and issues for the Uplift AI STT integration

Uplift AI

Learn more about Uplift AI’s speech services

API Keys

Create and manage your Uplift AI API keys

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:
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
  2. API Key: Generate a key (format: sk_api_...) from the API Keys page

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

api_key
str
default:"None"
Uplift AI API key. Falls back to the UPLIFT_API_KEY environment variable if not provided.
base_url
str
default:"https://api.upliftai.org/v1"
Base URL for the Uplift AI API.
sample_rate
int
default:"None"
Audio sample rate in Hz. If not provided, the pipeline’s sample rate is used.
model
str
default:"scribe"
Model to use for transcription. Options: "scribe" (full accuracy, 40 credits/min) or "scribe-mini" (cost-effective, 20 credits/min).
domain
str
default:"None"
Optional domain-specific optimization. Options: "phone-commerce" or "farming".
params
UpliftAISTTService.InputParams
default:"None"
Alternative parameter configuration. See InputParams below.

InputParams

Advanced configuration passed via the params constructor argument using UpliftAISTTService.InputParams(...).
ParameterTypeDefaultDescription
modelstr"scribe"Model to use. Options: "scribe" or "scribe-mini".
languagestr"ur"Transcription language. Currently only Urdu ("ur") is supported.
domainstrNoneOptional domain optimization: "phone-commerce" or "farming".
See the source repository for the authoritative, up-to-date configuration options.

Usage

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:
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 for the latest tested version and changelog.