Files
livekit-agents/python/livekit-plugins/livekit-plugins-meta
Théo Monnom b2c0fb5b0c Unify provider streams and harden voice lifecycle persistence
Migrate provider WebSocket handling to shared typed protocols, pooling, pacing, and idle timers. Preserve SmallestAI continuations with response-based silence completion and isolated segments.

Keep connection acquisition, reconnect controls, stream cleanup, and host wrapper ownership safe across cancellation. Consolidate provider interfaces and typed MCP contracts.

Normalize pending speech boundaries and preserve conversation identity, ordering, late results, and acknowledged checkpoints across overlapping voice runs. Extend deterministic regressions, storage observations, and lifecycle documentation.

Validation: rebuilt extension; 2900 Python tests passed; formatting, lint, and type checks passed. Rust, binding, codegen, and deterministic simulation checks are recorded in the audit and lifecycle verification records.
2026-11-14 16:10:47 -08:00
..

Meta plugin for LiveKit Agents

Support for Meta Muse Voice Transcribe using its realtime streaming speech-to-text interface.

Installation

pip install livekit-plugins-meta

Pre-requisites

Set a Meta Model API key in your environment using either variable:

MODEL_API_KEY=<your_model_api_key>
# Or: META_API_KEY=<your_model_api_key>

You can also pass the key directly with api_key=. The resolution order is api_key, MODEL_API_KEY, then META_API_KEY.

Usage

from livekit.agents import VoiceSession
from livekit.plugins import meta

session = VoiceSession(
    stt=meta.STT(
        keywords=["LiveKit", "Muse"],
        language_bias=["English"],
    ),
    # ... llm, tts, etc.
)

The plugin supports streaming recognition with server-side endpointing, cumulative interim transcripts, and mono PCM16 audio at 24 kHz. Connected streams must keep sending real-time PCM, including silence. keywords and language_bias are static hints applied during the initial handshake and cannot be changed on an active stream. Omit language_bias for automatic language detection.

Supported language names are: Arabic, Bengali, Dutch, English, French, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Kannada, Korean, Malay, Mandarin Chinese, Marathi, Polish, Portuguese, Spanish, Tagalog, Tamil, Telugu, Thai, Turkish, and Vietnamese. The per-stream language= argument also accepts corresponding language codes and locales, such as en-US, pt-BR, and zh-CN, and maps them to the documented names.

Muse realtime sessions have a maximum duration of 60 minutes. This plugin reports the provider close and does not rotate an active LiveKit speech stream automatically; start a new stream to continue. Batch recognition, diarization, detected-language metadata, and active-stream keyterm updates are not supported.