Skip to main content

Overview

UpliftHttpTTSService converts text into speech using Uplift AI’s 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.

Source Repository

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

Uplift AI

Learn more about Uplift AI’s text-to-speech service

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

Required Environment Variables

  • UPLIFT_API_KEY: Your Uplift AI API key for authentication

Configuration

api_key
str
required
Uplift AI API key for authentication (format: sk_api_...).
base_url
str
Base URL for the Uplift TTS API endpoint.
voice_id
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).
output_format
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.
sample_rate
int
default:"22050"
Audio sample rate in Hz.
aiohttp_session
aiohttp.ClientSession
default:"None"
Optional shared aiohttp session used for API requests. If not provided, the service creates and manages its own session.
params
UpliftHttpTTSService.InputParams
default:"None"
Optional input parameters for voice and output-format overrides. See InputParams below.

InputParams

Optional configuration passed via the params constructor argument using UpliftHttpTTSService.InputParams(...).
ParameterTypeDefaultDescription
voice_idOptional[str]NoneOptional default voice ID override.
output_formatOptional[str]"WAV_22050_16"Audio output format.
Available voices, formats, and defaults are defined by the integration. See the source repository for the authoritative, up-to-date list.

Usage

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