Skip to main content

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

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 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 omitted (automatic) Optional explicit 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 supports en, es, fr, de, hi, it, pt, and nl. Pass the explicit language for non-English audio.
  • 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.

Metadata

Release files for livekit-plugins-pyai 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-plugins-pyai 0.1.1
File Size Uploaded
livekit_plugins_pyai-0.1.1.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-pyai 0.1.1
File Interpreter ABI Platform
livekit_plugins_pyai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / livekit_plugins_pyai-0.1.1.tar.gz

Download URL livekit_plugins_pyai-0.1.1.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
13c646ec0f8c69620c1bb804042720ce96bc9c992afdfb1622faed4ca681d2f1
BLAKE2b-256 checksum
How to use checksums
90fb5fbc633061a0ce15f93c335fb392da86717670b4aa51f2b631fe52813e09
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 7, 2026.

Transparency log

Release files / livekit_plugins_pyai-0.1.1-py3-none-any.whl

Download URL livekit_plugins_pyai-0.1.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edbf90953862265ebc1a297267482ca71d45360313ecb2cf904f72ef8375b6cd
BLAKE2b-256 checksum
How to use checksums
ab7af7c9da17cdfc5c486406fb267a90b5187d9631ae0c8301d7afff74f1856a
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

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