livekit-plugins-pyai
PyAI Hear (speech-to-text) and Speak (text-to-speech) components for LiveKit Agents, maintained by PyAI.
Use this package when you want to own the LiveKit room, worker, LLM, tools, and turn policy. Use PyAI Omni when you want one managed speech-to-speech agent instead.
pip install livekit-plugins-pyai==0.1.3
Requires Python 3.10 or newer.
Replace the speech components
from livekit.agents import AgentSession
from livekit.plugins import pyai
session = AgentSession(
stt=pyai.STT(), # PyAI Hear (streaming STT)
llm=llm, # keep your existing LLM
tts=pyai.TTS(voice="stock_emma_en_gb"), # PyAI Speak (TTS)
vad=vad, # keep your existing VAD
)
Set PYAI_API_KEY securely in the server environment (or pass api_key=). The
key needs the hear:stream, hear:transcribe, and 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 includes examples/agent.py; install
livekit-plugins-pyai[examples] to run its optional LLM and VAD dependencies.
STT, pyai.STT(...)
| arg | default | notes |
|---|---|---|
api_key |
$PYAI_API_KEY |
opaque PyAI key |
base_url |
https://api.pyai.com |
API base |
model |
pyai-hear |
STT model |
language |
omitted (automatic) | Optional supported language code |
sample_rate |
16000 |
inbound frames are resampled to this |
Streams audio to the PyAI Hear socket and emits LiveKit INTERIM_TRANSCRIPT
(PyAI partial/speech_final) and FINAL_TRANSCRIPT (PyAI corrected final).
A batch recognize() path uses the sync transcription endpoint.
TTS, pyai.TTS(voice=..., ...)
| arg | default | notes |
|---|---|---|
voice |
(required) | a streaming-capable voice_id from GET /v1/voices |
api_key |
$PYAI_API_KEY |
opaque PyAI key |
base_url |
https://api.pyai.com |
API base |
model |
pyai-speak |
TTS model |
sample_rate |
24000 |
output PCM rate |
Requests response_format: pcm at the session sample rate and streams the raw
PCM into the agent's audio output as chunks arrive. End-to-end latency also
depends on your network, selected voice, LLM and turn policy.
Notes
- Billing/limits follow your PyAI key (
hear.minutes,speak.minutes); a realtime STT session counts against your key's 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. - LiveKit Cloud, telephony, 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
Adds public repository and issue links to package metadata and packaged guide links.
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 LiveKit Agents 1.8.0 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.
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.
Metadata
Release files for livekit-plugins-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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| livekit_plugins_pyai-0.1.3.tar.gz | 18.1 kB | With provenance | Details for livekit_plugins_pyai-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| livekit_plugins_pyai-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for livekit_plugins_pyai-0.1.3-py3-none-any.whl |
Total release size: 33.3 kB
Release files / livekit_plugins_pyai-0.1.3.tar.gz
| Download URL | livekit_plugins_pyai-0.1.3.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4273912e79d8d2ca1036d38e0c98f5ca35141f47a7cbbe198f7c1262b1739631
|
|
BLAKE2b-256 checksum How to use checksums |
b313ce741f3537216e818c631386e4a55ea9dd452c95fc6c51e328ccf7d0594b
|
| 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 / livekit_plugins_pyai-0.1.3-py3-none-any.whl
| Download URL | livekit_plugins_pyai-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e6d1bb91969a352ecee4c3007a281c75a3b4491fdb2add95dabce65c0441e2f
|
|
BLAKE2b-256 checksum How to use checksums |
474aceead8833952b710976d665f3ba8fd028f3440c17362cf2b136d7c64b1ca
|
| 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 livekit-plugins-pyai 0.1.3
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 livekit_plugins_pyai-0.1.3.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.