LiveKit Agent Plugins for Xunfei
Project description
LiveKit Plugins Xunfei
Agent Framework plugin for services from Xunfei. Currently supports STT.
Installation
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.
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))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_xunfei-1.2.2.tar.gz.
File metadata
- Download URL: livekit_plugins_xunfei-1.2.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1c1054496363e0564d486215b614302237bb82f5340151ec738ca5428f90381
|
|
| MD5 |
51b29c778b8e3b04b691c77eb48f4313
|
|
| BLAKE2b-256 |
ba013bf22582ea003438691a3e898722a78f9de8d34fbbc587c3f1f14fb7e0e9
|
File details
Details for the file livekit_plugins_xunfei-1.2.2-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_xunfei-1.2.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1dd864ab825ebb33103f73bfa99557a737e6ce251226c7d8cb32e5b1447209
|
|
| MD5 |
73106d32f23cff6e4a93df9bf82a709f
|
|
| BLAKE2b-256 |
988965f90d1d1a60eb607191d5ab8c20044a584f35a708c474bbcb2100572e4d
|