livekit-plugins-turn-detector


Namelivekit-plugins-turn-detector JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/livekit/agents
SummaryEnd of utterance detection for LiveKit Agents
upload_time2024-12-21 07:24:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.0
licenseApache-2.0
keywords webrtc realtime audio video livekit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LiveKit Plugins Turn Detector

This plugin introduces end-of-turn detection for LiveKit Agents using a custom open-weight model to determine when a user has finished speaking.

Traditional voice agents use VAD (voice activity detection) for end-of-turn detection. However, VAD models lack language understanding, often causing false positives where the agent interrupts the user before they finish speaking.

By leveraging a language model specifically trained for this task, this plugin offers a more accurate and robust method for detecting end-of-turns. The current version supports English only and should not be used when targeting other languages.

## Installation

```bash
pip install livekit-plugins-turn-detector
```

## Usage

This plugin is designed to be used with the `VoicePipelineAgent`:

```python
from livekit.plugins import turn_detector

agent = VoicePipelineAgent(
    ...
    turn_detector=turn_detector.EOUModel(),
)
```

## Running your agent

This plugin requires model files. Before starting your agent for the first time, or when building Docker images for deployment, run the following command to download the model files:

```bash
python my_agent.py download-files
```

## Model system requirements

The end-of-turn model is optimized to run on CPUs with modest system requirements. It is designed to run on the same server hosting your agents. On a 4-core server instance, it completes inference in ~50ms with minimal CPU usage.

The model requires 1.5GB of RAM and runs within a shared inference server, supporting multiple concurrent sessions.

We are working to reduce the CPU and memory requirements in future releases.

## License

The plugin source code is licensed under the Apache-2.0 license.

The end-of-turn model is licensed under the [LiveKit Model License](https://huggingface.co/livekit/turn-detector/blob/main/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/livekit/agents",
    "name": "livekit-plugins-turn-detector",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.0",
    "maintainer_email": null,
    "keywords": "webrtc, realtime, audio, video, livekit",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/b1/7b/a69660e13532bd00db2f8c1ea9b6c7b92beb55b896e8418ba1d82d8ae355/livekit_plugins_turn_detector-0.3.3.tar.gz",
    "platform": null,
    "description": "# LiveKit Plugins Turn Detector\n\nThis plugin introduces end-of-turn detection for LiveKit Agents using a custom open-weight model to determine when a user has finished speaking.\n\nTraditional voice agents use VAD (voice activity detection) for end-of-turn detection. However, VAD models lack language understanding, often causing false positives where the agent interrupts the user before they finish speaking.\n\nBy leveraging a language model specifically trained for this task, this plugin offers a more accurate and robust method for detecting end-of-turns. The current version supports English only and should not be used when targeting other languages.\n\n## Installation\n\n```bash\npip install livekit-plugins-turn-detector\n```\n\n## Usage\n\nThis plugin is designed to be used with the `VoicePipelineAgent`:\n\n```python\nfrom livekit.plugins import turn_detector\n\nagent = VoicePipelineAgent(\n    ...\n    turn_detector=turn_detector.EOUModel(),\n)\n```\n\n## Running your agent\n\nThis plugin requires model files. Before starting your agent for the first time, or when building Docker images for deployment, run the following command to download the model files:\n\n```bash\npython my_agent.py download-files\n```\n\n## Model system requirements\n\nThe end-of-turn model is optimized to run on CPUs with modest system requirements. It is designed to run on the same server hosting your agents. On a 4-core server instance, it completes inference in ~50ms with minimal CPU usage.\n\nThe model requires 1.5GB of RAM and runs within a shared inference server, supporting multiple concurrent sessions.\n\nWe are working to reduce the CPU and memory requirements in future releases.\n\n## License\n\nThe plugin source code is licensed under the Apache-2.0 license.\n\nThe end-of-turn model is licensed under the [LiveKit Model License](https://huggingface.co/livekit/turn-detector/blob/main/LICENSE).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "End of utterance detection for LiveKit Agents",
    "version": "0.3.3",
    "project_urls": {
        "Documentation": "https://docs.livekit.io",
        "Homepage": "https://github.com/livekit/agents",
        "Source": "https://github.com/livekit/agents",
        "Website": "https://livekit.io/"
    },
    "split_keywords": [
        "webrtc",
        " realtime",
        " audio",
        " video",
        " livekit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e0beee5db5233c9894d1854bd257405be47e98ad2615a48ea758c70a325b447",
                "md5": "2f14762635cfc4054496fd07bb2b5a9b",
                "sha256": "ec815ae36a76a78089ce745a345d1da3e00e1a5f7acabadbf12dd5f5f9b2559e"
            },
            "downloads": -1,
            "filename": "livekit_plugins_turn_detector-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2f14762635cfc4054496fd07bb2b5a9b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.0",
            "size": 6360,
            "upload_time": "2024-12-21T07:24:48",
            "upload_time_iso_8601": "2024-12-21T07:24:48.033309Z",
            "url": "https://files.pythonhosted.org/packages/1e/0b/eee5db5233c9894d1854bd257405be47e98ad2615a48ea758c70a325b447/livekit_plugins_turn_detector-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b17ba69660e13532bd00db2f8c1ea9b6c7b92beb55b896e8418ba1d82d8ae355",
                "md5": "fbf04f2483f0ea62654fec143052dd0f",
                "sha256": "d9216a7ec76260ac546e2d825f1b0067150ba1d7f620e7f26ccbad5e510cee93"
            },
            "downloads": -1,
            "filename": "livekit_plugins_turn_detector-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "fbf04f2483f0ea62654fec143052dd0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 5448,
            "upload_time": "2024-12-21T07:24:54",
            "upload_time_iso_8601": "2024-12-21T07:24:54.242956Z",
            "url": "https://files.pythonhosted.org/packages/b1/7b/a69660e13532bd00db2f8c1ea9b6c7b92beb55b896e8418ba1d82d8ae355/livekit_plugins_turn_detector-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-21 07:24:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "livekit",
    "github_project": "agents",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "livekit-plugins-turn-detector"
}
        
Elapsed time: 0.45079s