Skip to main content

pipecat-pyai

PyAI Hear (speech-to-text) and Speak (text-to-speech) services for Pipecat, maintained by PyAI.

Use this package when you want to own the Pipecat transport, frame pipeline, LLM, tools, and turn policy. Use PyAI Omni when you want one managed speech-to-speech agent instead.

pip install pipecat-pyai==0.1.2

Requires Python 3.11 or newer.

Usage

from pipecat_pyai import PyAISTTService, PyAITTSService

stt = PyAISTTService()             # PyAI Hear (streaming STT)
tts = PyAITTSService(voice="stock_emma_en_gb")  # PyAI Speak (TTS)

Set your key once: export PYAI_API_KEY=pyai_live_... (or pass api_key=). The key needs the hear:stream, speak:synthesize scopes. List voices at GET https://api.pyai.com/v1/voices. See the integration status and comparison for the current public guide link, production notes, and release status. The source distribution also includes examples/bot.py.

PyAISTTService

WebSocket streaming STT (subclass of Pipecat's WebsocketSTTService). Sends pipeline audio to the PyAI Hear socket and pushes InterimTranscriptionFrame (PyAI partial/speech_final) and TranscriptionFrame (PyAI corrected final). Args: api_key, base_url, model (pyai-hear), language, sample_rate. The service sends the canonical commit control when Pipecat's VAD reports the end of speech and marks the corrected transcript finalized.

PyAITTSService

Chunked TTS (subclass of TTSService). Requests response_format: pcm at the pipeline's output sample rate and pushes TTSAudioRawFrames as the audio streams. Args: voice (required), api_key, base_url, model (pyai-speak), sample_rate, aiohttp_session. Use a streaming-capable voice id.

Notes

  • Billing/limits follow your PyAI key (hear.minutes, speak.minutes); a streaming STT session counts against your key's realtime concurrency.
  • Built on the official PyAI Python SDK (pyai-sdk).
  • Hear streaming supports en, es, fr, de, hi, it, pt, and nl. Pass the explicit language for non-English audio.
  • Pipecat Cloud, transports, your LLM, and worker hosting are separate from PyAI Hear and Speak metering.
  • For a fully managed agent, including turn-taking, reasoning, tools, caller continuity when enabled on an Agent profile and a caller key is available, and optional telephony, use PyAI Omni instead.
  • Licensed under Apache-2.0. The source is included in the wheel and source distribution.

Language is detected automatically when language is omitted. Pass an explicit supported language only when you intend to pin recognition.

0.1.2 release

Includes the pyai.v1 WebSocket handshake marker alongside the credential subprotocol for compatibility with the current Hear endpoint. TTS continues to reuse an aiohttp session and forward PCM audio as it arrives.

Metadata

Release files for pipecat-pyai 0.1.2

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-pyai 0.1.2
File Size Uploaded
pipecat_pyai-0.1.2.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-pyai 0.1.2
File Interpreter ABI Platform
pipecat_pyai-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 28.7 kB

Release files / pipecat_pyai-0.1.2.tar.gz

Download URL pipecat_pyai-0.1.2.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1cd5622618cef0e734321fa2b22d196c36ec5d5321ef0430e8e9a63ad42e44e5
BLAKE2b-256 checksum
How to use checksums
80112ac340c62bac6bc8051e0490fe66063b1d1715d9c8d57e295ea479767dce
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 Sep 8, 2026.

Transparency log

Release files / pipecat_pyai-0.1.2-py3-none-any.whl

Download URL pipecat_pyai-0.1.2-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a60ed11fad728711408913b808863bcafdd4336be9248f8a10f4a3a7bd9bede3
BLAKE2b-256 checksum
How to use checksums
5004c0535e770c16d5b30529a90ba79f3b8faf3e520d08a563547f51f16fc4b4
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 Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

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