# LiveKit Plugins Xunfei
Agent Framework plugin for services from Xunfei. Currently supports [STT](https://console.xfyun.cn/services/rta).
## Installation
```python
pip install livekit-plugins-xunfei
```
## Pre-requisites
- XunFei STT environment variable: `XUNFEI_STT_APP_ID`, `XUNFEI_STT_API_KEY`.
## Usage
This example shows how to use the xunfei plugin to create a voice agent.
```python
from livekit.agents import Agent, AgentSession, JobContext, cli, WorkerOptions
from livekit.plugins import xunfei
from dotenv import load_dotenv
async def entry_point(ctx: JobContext):
await ctx.connect()
agent = Agent(instructions="You are a helpful assistant.")
session = AgentSession(
# app_id and api_key can be found in the xfyun console.
stt=xunfei.STT(app_id="xxx", api_key="xxx"),
)
await session.start(agent=agent, room=ctx.room)
await session.generate_reply()
if __name__ == "__main__":
load_dotenv()
cli.run_app(WorkerOptions(entrypoint_fnc=entry_point))
```
Raw data
{
"_id": null,
"home_page": null,
"name": "livekit-plugins-xunfei",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "audio, livekit, realtime, video, webrtc",
"author": null,
"author_email": "wangmengdi <790990241@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/ab/5b/75784c551b46d6122023b22222e732e4b00d38b218cd783afe403a6bfc40/livekit_plugins_xunfei-1.2.0.tar.gz",
"platform": null,
"description": "# LiveKit Plugins Xunfei\n\nAgent Framework plugin for services from Xunfei. Currently supports [STT](https://console.xfyun.cn/services/rta).\n\n## Installation\n```python\npip install livekit-plugins-xunfei\n```\n\n## Pre-requisites\n\n- XunFei STT environment variable: `XUNFEI_STT_APP_ID`, `XUNFEI_STT_API_KEY`.\n\n## Usage\n\n\nThis example shows how to use the xunfei plugin to create a voice agent.\n\n```python\nfrom livekit.agents import Agent, AgentSession, JobContext, cli, WorkerOptions\nfrom livekit.plugins import xunfei\nfrom dotenv import load_dotenv\n\n\nasync def entry_point(ctx: JobContext):\n \n await ctx.connect()\n \n agent = Agent(instructions=\"You are a helpful assistant.\")\n\n session = AgentSession(\n # app_id and api_key can be found in the xfyun console.\n stt=xunfei.STT(app_id=\"xxx\", api_key=\"xxx\"),\n )\n \n await session.start(agent=agent, room=ctx.room)\n \n await session.generate_reply()\n\nif __name__ == \"__main__\":\n load_dotenv()\n cli.run_app(WorkerOptions(entrypoint_fnc=entry_point))\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "LiveKit Agent Plugins for Xunfei",
"version": "1.2.0",
"project_urls": null,
"split_keywords": [
"audio",
" livekit",
" realtime",
" video",
" webrtc"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "71423420b147bf2a2abfb55d00813fd7c7f2e82997b4b573358c194fd31d4d6b",
"md5": "dd95f3b4b06c0cbd8396d88570702f40",
"sha256": "cc2f970dedef276d9aa0b5edacdb13dc6f8c93507ed05048f3d9fc546a754b49"
},
"downloads": -1,
"filename": "livekit_plugins_xunfei-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dd95f3b4b06c0cbd8396d88570702f40",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6309,
"upload_time": "2025-07-23T02:53:57",
"upload_time_iso_8601": "2025-07-23T02:53:57.454998Z",
"url": "https://files.pythonhosted.org/packages/71/42/3420b147bf2a2abfb55d00813fd7c7f2e82997b4b573358c194fd31d4d6b/livekit_plugins_xunfei-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ab5b75784c551b46d6122023b22222e732e4b00d38b218cd783afe403a6bfc40",
"md5": "40dbc407cbf6f3d33f76e2677df9ec78",
"sha256": "a7c3e1f17694e228948dc1cc5dd5314f2b7d6339ad65a9a838fe8baf51c88a0a"
},
"downloads": -1,
"filename": "livekit_plugins_xunfei-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "40dbc407cbf6f3d33f76e2677df9ec78",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6527,
"upload_time": "2025-07-23T02:53:58",
"upload_time_iso_8601": "2025-07-23T02:53:58.750440Z",
"url": "https://files.pythonhosted.org/packages/ab/5b/75784c551b46d6122023b22222e732e4b00d38b218cd783afe403a6bfc40/livekit_plugins_xunfei-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 02:53:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "livekit-plugins-xunfei"
}