Skip to main content

pipecat-sprag

Sprag speech and language models for Pipecat.

This integration is maintained by Sprag.

Service Import Model
SpragSTTService pipecat_sprag.stt Rhythm (speech to text)
SpragLLMService pipecat_sprag.llm Symphony (LLM)
SpragTTSService pipecat_sprag.tts Chorus (text to speech)

Installation

uv add pipecat-sprag

Each service reads your API key from the SPRAG_API_KEY environment variable, or takes it as api_key=. You can generate a key from API keys in the Sprag app.

Usage

Each service drops into a Pipecat pipeline in place of any other STT, LLM, or TTS service:

from pipecat_sprag.llm import SpragLLMService
from pipecat_sprag.stt import SpragSTTService
from pipecat_sprag.tts import SpragTTSService

stt = SpragSTTService()
llm = SpragLLMService()
tts = SpragTTSService(settings=SpragTTSService.Settings(voice="wade"))

pipeline = Pipeline(
    [transport.input(), stt, user_aggregator, llm, tts, transport.output(), assistant_aggregator]
)
  • SpragSTTService streams audio to Rhythm over Sprag's streaming transcription socket (wss://api.sprag.ai/v1/audio/transcriptions). By default your pipeline's VAD decides when a turn ends; pass turn_detection={"type": "server_vad"} to let Sprag detect turns instead.
  • SpragLLMService runs Symphony through Sprag's chat completions API, with function calling and token usage metrics.
  • SpragTTSService streams Chorus speech over Sprag's streaming speech socket (wss://api.sprag.ai/v1/audio/speech), one sentence at a time. It defaults to the chorus model and the wade voice; the available voices are listed in voice presets.

Each service takes settings=<Service>.Settings(...) for its model and other options, and api_key= if you don't use the SPRAG_API_KEY environment variable.

Example

examples/voice_agent.py is a complete voice agent running on Rhythm, Symphony, and Chorus. It uses Pipecat's development runner:

uv sync --group examples
SPRAG_API_KEY=... uv run examples/voice_agent.py

Then open the printed URL in your browser and talk to it.

Compatibility

Requires pipecat-ai>=1.8,<2. Tested with Pipecat v1.12.0.

Development

uv sync
uv run ruff check && uv run ruff format --check
uv run mypy src
uv run pytest

Live tests call api.sprag.ai and are skipped by default: SPRAG_API_KEY=... uv run pytest -m live.

License

BSD 2-Clause. See LICENSE.

Metadata

Release files for pipecat-sprag 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipecat-sprag 0.1.0
File Size Uploaded
pipecat_sprag-0.1.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-sprag 0.1.0
File Interpreter ABI Platform
pipecat_sprag-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / pipecat_sprag-0.1.0.tar.gz

Download URL pipecat_sprag-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
82b6270df55ff51d6f5d72525ced53076f97f352d370db436a2b97155d7bcc50
BLAKE2b-256 checksum
How to use checksums
14953197ceb3887452cbb5617cc0027c85370331fc89c03d43de9ba139052e18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / pipecat_sprag-0.1.0-py3-none-any.whl

Download URL pipecat_sprag-0.1.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de7bde7f61129cbdfcd1b304f30afeaf43cb72d8f6da0bdb887ce431abd677de
BLAKE2b-256 checksum
How to use checksums
cad36fe1766ead8a14979bff0c61217b088ad841bced3fd07582899cd77cf914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page