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

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 supports 29 recognition languages, with automatic detection when language is omitted. To pin recognition, use a code from the current language table.
  • 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.4 release

STT model/language settings now match the Hear request and pass Pipecat startup validation. Automatic language detection remains the default.

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

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.4
File Size Uploaded Provenance Actions
pipecat_pyai-0.1.4.tar.gz 17.7 kB With provenance Details for pipecat_pyai-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 30.7 kB

Release files / pipecat_pyai-0.1.4.tar.gz

Download URL pipecat_pyai-0.1.4.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f710a2c7926d5f62988ef6c600ddded1afba3d2019088b52894fbcd6de9c6312
BLAKE2b-256 checksum
How to use checksums
407835ba32774a52fbae5e7497ef4fe6a4561aeb29b4a6aff583175c2f721c42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

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

Download URL pipecat_pyai-0.1.4-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de8342ff5dc999c5ebf8c8303dfbefd9e0a49e37e378bd109d23baa6a5433a95
BLAKE2b-256 checksum
How to use checksums
b247f1fd341882beac4885e0d75eee9d99097fbd10408658165d08a638c08770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Security for pipecat-pyai 0.1.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pipecat_pyai-0.1.4.tar.gz

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 Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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