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.5
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 PYAI_API_KEY securely in the server environment (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
languageis omitted. See 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.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.
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.5 release
Adds public repository and issue links to package metadata and packaged guide links. The TTS service now closes its owned HTTP session during guaranteed framework cleanup, including when stop/cancel frames are skipped; caller-owned sessions remain open.
Maintainer and compatibility
Maintained by PyAI, operated by SaaS Labs US, Inc. Source and issues: https://github.com/atomsai/pyai-speech-integrations
A representative two-turn media → STT → LLM → TTS flow passed with Pipecat 1.8.1 on Python 3.12 on November 12, 2026. Recorded audio was independently transcribed and a human confirmed intelligible playback. This does not establish microphone-driven interruption or compatibility with every version allowed by the dependency range.
That audio run used the preceding adapter code. Version 0.1.4 initializes STT model/language settings; its minimum/latest framework checks passed separately. Provider options are constructor-only: runtime settings updates are unsupported.
Before running an example, verify the key's project, environment, and billing
limits with GET https://api.pyai.com/v1/me. Both test and live keys require
checking their actual limits; an environment label is not a cost cap.
Full WebRTC examples and their separately pinned dependencies are in the existing demos. Those demo pins are distinct from the versions used in the November 12 acceptance run; do not infer audio qualification of the newer pins from that run.
Run the standalone WebRTC example
From this package directory, use Python 3.12 and install the example's pinned dependencies in an isolated environment:
python3.12 -m venv .venv
.venv/bin/pip install "pipecat-pyai==0.1.5" "pipecat-ai[webrtc,runner,openai]==1.14.0" "python-dotenv==1.1.1"
.venv/bin/python examples/bot.py -t webrtc --host 127.0.0.1
Set PYAI_API_KEY and OPENAI_API_KEY securely before starting. Open the runner's
local URL and connect with microphone permission. Use headphones to avoid echo.
The example includes the transport, VAD, LLM, speech services, and disconnect
cleanup. DEMO_SECONDS defaults to 60; it limits session duration, not spending.
Running a conversation can incur PyAI and LLM charges.
Non-audio qualification on November 13, 2026: the pinned Pipecat 1.14.0 / pipecat-pyai 0.1.4 environment passed dependency consistency, CLI imports, constructor-default checks, and pipeline startup/cancellation on Python 3.12. The check disabled the STT connection hook and blocked outbound connections; it generated no audio and does not establish live speech or barge-in behavior.
Metadata
Release files for pipecat-pyai 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipecat_pyai-0.1.5.tar.gz | 20.9 kB | With provenance | Details for pipecat_pyai-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipecat_pyai-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for pipecat_pyai-0.1.5-py3-none-any.whl |
Total release size: 35.1 kB
Release files / pipecat_pyai-0.1.5.tar.gz
| Download URL | pipecat_pyai-0.1.5.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57b83438f546dc1b38f54ccd68f9f1682e83b04a68d0be0966dc8913a7db0ed4
|
|
BLAKE2b-256 checksum How to use checksums |
711f0d7ab28facc791a2e28802c94f14506188ffc106a834b5693cc337a718f6
|
| 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 16, 2026.
Transparency logRelease files / pipecat_pyai-0.1.5-py3-none-any.whl
| Download URL | pipecat_pyai-0.1.5-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1810be17dc2608e9db4ead43dd7988299be0c988d3bf8dd28ca6da68563d6f9
|
|
BLAKE2b-256 checksum How to use checksums |
96d6a29e93c6c0a0667765212a97f822dbc64ade56c6f78367290a6a1b4efe4e
|
| 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 16, 2026.
Transparency logSecurity for pipecat-pyai 0.1.5
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.
Attestation for pipecat_pyai-0.1.5.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 16, 2026.
Transparency logA 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.