# 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/df/4e/feb0a3cca84f1b96c2d2d96a82c4ece0c97df01f82d1a75de0382a1f5f5e/livekit_plugins_xunfei-1.2.8.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.8",
"project_urls": null,
"split_keywords": [
"audio",
" livekit",
" realtime",
" video",
" webrtc"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "fac9ea86938433e0ecf59e8d1b0f4b81a3230f360d29a65ebf052be734e34790",
"md5": "6dcc53ce6a6b7472c2f54a52d07f588e",
"sha256": "2369c22c1053d3f455e407cd9a0e00c52721ebc7f6b092920337eab29ee8bac4"
},
"downloads": -1,
"filename": "livekit_plugins_xunfei-1.2.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6dcc53ce6a6b7472c2f54a52d07f588e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6308,
"upload_time": "2025-09-04T07:48:37",
"upload_time_iso_8601": "2025-09-04T07:48:37.368019Z",
"url": "https://files.pythonhosted.org/packages/fa/c9/ea86938433e0ecf59e8d1b0f4b81a3230f360d29a65ebf052be734e34790/livekit_plugins_xunfei-1.2.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "df4efeb0a3cca84f1b96c2d2d96a82c4ece0c97df01f82d1a75de0382a1f5f5e",
"md5": "b52cfb1700446b89b2bb465b03fe57a6",
"sha256": "e35e1e89f290143f6cc6e5747fac19bde7119940f69b573d67e20142a5f7274e"
},
"downloads": -1,
"filename": "livekit_plugins_xunfei-1.2.8.tar.gz",
"has_sig": false,
"md5_digest": "b52cfb1700446b89b2bb465b03fe57a6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6527,
"upload_time": "2025-09-04T07:48:38",
"upload_time_iso_8601": "2025-09-04T07:48:38.316187Z",
"url": "https://files.pythonhosted.org/packages/df/4e/feb0a3cca84f1b96c2d2d96a82c4ece0c97df01f82d1a75de0382a1f5f5e/livekit_plugins_xunfei-1.2.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-04 07:48:38",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "livekit-plugins-xunfei"
}