Skip to main content

Meta STT plugin guide

How to use the Meta STT plugin for LiveKit Agents.

Available inPython
|
Node.js

Overview

This plugin allows you to use Meta Muse Voice Transcribe  as an STT provider for your voice agents. It streams mono PCM16 audio at 24 kHz over a WebSocket and returns cumulative interim transcripts with server-side endpointing.

Installation

Install the plugin:

uv add "livekit-agents[meta]~=1.8"
pnpm add @livekit/agents-plugin-meta@1.x

Authentication

The Meta plugin requires a Meta Model API key .

Set MODEL_API_KEY in your .env file:

MODEL_API_KEY=<your-meta-model-api-key>

The plugin resolves the key from the api_key parameter first, then MODEL_API_KEY, then META_API_KEY.

Usage

Use Meta STT in an AgentSession or as a standalone transcription service. For example, you can use this STT in the Voice AI quickstart.

from livekit.agents import AgentSession
from livekit.plugins import meta
session = AgentSession(
stt=meta.STT(
keywords=["LiveKit", "Muse"],
language_bias=["English"],
),
# ... llm, tts, etc.
)
import { voice } from '@livekit/agents';
import * as meta from '@livekit/agents-plugin-meta';
const session = new voice.AgentSession({
stt: new meta.STT({
keywords: ['LiveKit', 'Muse'],
languageBias: ['English'],
}),
// ... llm, tts, etc.
});

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

Parameters are named below as they appear in Python. In Node.js, pass them to the STT constructor using their camelCase names (for example, apiKey, languageBias).

api_keystringEnv: MODEL_API_KEY

Meta Model API key. Required if the environment variable isn't set.

modelstringDefault: muse-voice-transcribe-1.0

Muse Voice Transcribe model to use.

urlstringDefault: wss://api.meta.ai/v1/asr/realtime

Realtime Muse ASR WebSocket endpoint. Must use wss://.

keywordslist[str]

Recognition keywords, such as names or domain-specific vocabulary, to guide spelling. Sent during the initial handshake and can't be changed on an active stream.

language_biaslist[str]

Languages to bias speech recognition toward. Omit it for automatic language detection. Sent during the initial handshake and can't be changed on an active stream. Supported 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.

Per-stream language bias

Set language per stream to add a single bias to that stream only. It accepts a supported language name or a language code or locale such as en-US, pt-BR, or zh-CN, which the plugin maps to the corresponding name.

stream = stt.stream(language="en-US")
const stream = stt.stream({ language: 'en-US' });

Limitations

Muse realtime sessions have a maximum duration of 60 minutes. The plugin reports a provider connection close instead of automatically rotating to a new stream, so start a new stream to continue. Connected streams must keep sending realtime PCM, including silence. Batch recognition, diarization, detected-language metadata, and keyterm updates on an active stream aren't supported.

Additional resources

The following resources provide more information about using Meta with LiveKit Agents.