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

livekit_plugins_pyai-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_pyai-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

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

Hashes for livekit_plugins_pyai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7cf36ed2b06eaa5d2d5b3bc61980558b93dfb9075ee76b3927315f929831418f
MD5 b1d4a1d1fe4656e500b463223352af56
BLAKE2b-256 f40cd2d33c2f07a63d352b110f72520085f362e41991f016a06e8ef4154ac29d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_pyai-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_pyai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9b0cdeed624c706f888b20e70876dba3e7b289f8d793f303f78262329b2f10e
MD5 4fd903466480bc516ad04d37bf7fffde
BLAKE2b-256 b26bcc1aa9f63d3d4658f913dab7396f949fbb68b7aa996494aee750fd20b5ce

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page