Skip to main content

AssemblyAI plugin for LiveKit Agents

Support for Streaming Speech-to-Text and Streaming Text-to-Speech from AssemblyAI.

More information is available in the docs for the STT integration and for AssemblyAI's Streaming TTS.

Installation

pip install livekit-plugins-assemblyai

Pre-requisites

You'll need to specify an AssemblyAI API Key. It can be set as environment variable: ASSEMBLYAI_API_KEY.

Usage

from livekit.agents import AgentSession, TurnHandlingOptions
from livekit.plugins import assemblyai

session = AgentSession(
    stt=assemblyai.STT(model="universal-3-6-pro", mode="balanced"),
    tts=assemblyai.TTS(
        model="assemblyai-tts-1",
        voice="987db62e-a2c2-569a-9c4d-82460cdea1bd",  # Keegan
    ),
    # let AssemblyAI decide when the user has finished speaking
    turn_handling=TurnHandlingOptions(turn_detection="stt"),
    # use the TTS word timings for the transcript and for what an interrupted reply said
    use_tts_aligned_transcript=True,
    # ... llm, vad, etc.
)

Speech-to-text

assemblyai.STT streams Universal-3.6 Pro by default (model). Useful options:

  • mode: "min_latency", "balanced" or "max_accuracy".
  • language_codes: steer transcription toward one or more expected languages ("es" or ["en", "es"]).
  • prompt: context about the audio, such as its domain or scenario, to help recognize likely vocabulary (up to 1,750 characters).
  • keyterms_prompt: names and terms the model should get right.

Text-to-speech

assemblyai.TTS streams speech over a pooled WebSocket and cancels in-flight audio when the user interrupts. Useful options:

  • voice: a voice's id, from the voice library or a custom (cloned) voice; defaults to Keegan. Slugs such as "aai-linda-3" also work, but can change, while ids don't.
  • language: a code such as "es", set independently of the voice.
  • model: defaults to assemblyai-tts-1.
  • base_url: the US data zone by default; wss://tts.eu.assemblyai.com keeps data in the EU.
  • word_timestamps: per-word timings (default True). With AgentSession(use_tts_aligned_transcript=True), LiveKit uses them to sync the transcript and to record an interrupted reply up to the word the user heard.

Call tts.prewarm() to open the session before the first reply.

Metadata

Release files for livekit-plugins-assemblyai 1.8.9

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-assemblyai 1.8.9
File Size Uploaded Provenance
livekit_plugins_assemblyai-1.8.9.tar.gz 26.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-assemblyai 1.8.9
File Interpreter ABI Platform
livekit_plugins_assemblyai-1.8.9-py3-none-any.whl Python 3 none any Details

Total release size: 53.3 kB

Release files / livekit_plugins_assemblyai-1.8.9.tar.gz

Download URL livekit_plugins_assemblyai-1.8.9.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c771ec7ac6c3c909ca15dcccf03d678eac23ce029c48e48d8b74d87ccfe32fbc
BLAKE2b-256 checksum
How to use checksums
6e74cb3e173f4ca7796fc953e44da0476c3149a63ea4e524a170154f21b3925d
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 Oct 24, 2026.

Transparency log

Release files / livekit_plugins_assemblyai-1.8.9-py3-none-any.whl

Download URL livekit_plugins_assemblyai-1.8.9-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b16f6971e8551672e233b34ad0a2f9d7f018c0b113a4a682cf0a7926c7a2dbd5
BLAKE2b-256 checksum
How to use checksums
6f713b43d72d053e21eff9cf0b6650b2bff5671b11b38c4126ad40e11810f8e3
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 Oct 24, 2026.

Transparency log

Security for livekit-plugins-assemblyai 1.8.9

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for livekit_plugins_assemblyai-1.8.9.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 Oct 24, 2026.

Transparency log

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

Release history Release notifications | RSS feed

This release

1.8.9 This release

2 release files Full provenance

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