Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions livekit-agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ langchain = ["livekit-plugins-langchain>=1.7.1"]
lemonslice = ["livekit-plugins-lemonslice>=1.7.1"]
liveavatar = ["livekit-plugins-liveavatar>=1.7.1"]
lmnt = ["livekit-plugins-lmnt>=1.7.1"]
meta = ["livekit-plugins-meta>=1.7.1"]
minimax = ["livekit-plugins-minimax-ai>=1.7.1"]
mistralai = ["livekit-plugins-mistralai>=1.7.1"]
murf = ["livekit-plugins-murf>=1.7.1"]
Expand Down
40 changes: 40 additions & 0 deletions livekit-plugins/livekit-plugins-meta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Meta plugin for LiveKit Agents

Support for Meta [Muse Voice Transcribe](https://dev.meta.ai/docs/speech-to-text) using its [realtime streaming speech-to-text interface](https://dev.meta.ai/docs/api-reference/voice/realtime).

## Installation

```bash
pip install livekit-plugins-meta
```

## Pre-requisites

Set a Meta Model API key in your environment:

```bash
MODEL_API_KEY=<your_model_api_key>
```

You can also pass the key directly with `api_key=`.

## Usage

```python
from livekit.agents import AgentSession
from livekit.plugins import meta

session = AgentSession(
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2023 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Meta Muse Voice Transcribe plugin for LiveKit Agents."""

from .stt import STT, SpeechStream
from .version import __version__

__all__ = ["STT", "SpeechStream", "__version__"]

from livekit.agents import Plugin

from .log import logger


class MetaPlugin(Plugin):
def __init__(self) -> None:
super().__init__(__name__, __version__, __package__, logger)


Plugin.register_plugin(MetaPlugin())

# Cleanup docs of unexported modules.
_module = dir()
NOT_IN_ALL = [name for name in _module if name not in __all__]

__pdoc__ = {}
for name in NOT_IN_ALL:
__pdoc__[name] = False
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import logging

logger = logging.getLogger("livekit.plugins.meta")
Empty file.
Loading