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

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.

0.1.3 release

Automatic transcript finals no longer satisfy a later requested speech commit. When stopping, the adapter waits for the matching commit completion and keeps all final transcript text, including a late suffix. Older completion messages remain compatible; the existing five-second drain timeout is unchanged.

Metadata

Release files for pipecat-pyai 0.1.3

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.3
File Size Uploaded
pipecat_pyai-0.1.3.tar.gz 17.2 kB Details

Built distribution (wheel)

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

Total release size: 30.1 kB

Release files / pipecat_pyai-0.1.3.tar.gz

Download URL pipecat_pyai-0.1.3.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
87591c991227e6fdf41a2360899a8c51ac71d65d037d92431643f93f0dc473f9
BLAKE2b-256 checksum
How to use checksums
76b1e001cadb041c9a5527e8f4a5984188e40dcb33122b69b0d510d543ffb068
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 24, 2026.

Transparency log

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

Download URL pipecat_pyai-0.1.3-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55d3052b5292649a180d46258cb8755c90ea808b54baf31f56e25a43f1e53c91
BLAKE2b-256 checksum
How to use checksums
1976571a4e34e072b1b8a25afad508aa710f772b6a2ab3ec2feed17f2acf7b53
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

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