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.0
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(language="en"), # 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 your key once: export PYAI_API_KEY=pyai_live_... (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 |
en |
ISO-639-1 hint |
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 straight into the agent's audio output (low time-to-first-byte).
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 streaming is English-only. Use Omni for multilingual realtime agents.
- 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_pyai-0.1.0.tar.gz.
File metadata
- Download URL: livekit_plugins_pyai-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cf36ed2b06eaa5d2d5b3bc61980558b93dfb9075ee76b3927315f929831418f
|
|
| MD5 |
b1d4a1d1fe4656e500b463223352af56
|
|
| BLAKE2b-256 |
f40cd2d33c2f07a63d352b110f72520085f362e41991f016a06e8ef4154ac29d
|
Provenance
The following attestation bundles were made for livekit_plugins_pyai-0.1.0.tar.gz:
Publisher:
publish-livekit-plugin-pypi.yml on atomsai/pyai-platform-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_pyai-0.1.0.tar.gz -
Subject digest:
7cf36ed2b06eaa5d2d5b3bc61980558b93dfb9075ee76b3927315f929831418f - Sigstore transparency entry: 2498566787
- Sigstore integration time:
-
Permalink:
atomsai/pyai-platform-backend@89966001cb589e87000e4463379f8bc78b3597ca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/atomsai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-livekit-plugin-pypi.yml@89966001cb589e87000e4463379f8bc78b3597ca -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file livekit_plugins_pyai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_pyai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9b0cdeed624c706f888b20e70876dba3e7b289f8d793f303f78262329b2f10e
|
|
| MD5 |
4fd903466480bc516ad04d37bf7fffde
|
|
| BLAKE2b-256 |
b26bcc1aa9f63d3d4658f913dab7396f949fbb68b7aa996494aee750fd20b5ce
|
Provenance
The following attestation bundles were made for livekit_plugins_pyai-0.1.0-py3-none-any.whl:
Publisher:
publish-livekit-plugin-pypi.yml on atomsai/pyai-platform-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_pyai-0.1.0-py3-none-any.whl -
Subject digest:
c9b0cdeed624c706f888b20e70876dba3e7b289f8d793f303f78262329b2f10e - Sigstore transparency entry: 2498566789
- Sigstore integration time:
-
Permalink:
atomsai/pyai-platform-backend@89966001cb589e87000e4463379f8bc78b3597ca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/atomsai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-livekit-plugin-pypi.yml@89966001cb589e87000e4463379f8bc78b3597ca -
Trigger Event:
workflow_dispatch
-
Statement type: