LiveKit Agent Plugins for Xunfei
Project description
LiveKit Plugins Baidu
Agent Framework plugin for services from Baidu. currently supports: STT.
Installation
pip install livekit-plugins-baidu
Pre-requisites
- Volcengine STT environment variable:
BAIDU_API_KEY
Usage
This example shows how to use the Baidu STT plugin.
from livekit.agents import Agent, AgentSession, JobContext, cli, WorkerOptions
from livekit.plugins import baidu
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 can be found in the baidu cloud console. https://console.bce.baidu.com/ai-engine/old/#/ai/speech/app/detail~appId=6752989
stt=volcengine.STT(app_id=1000000),
)
await session.start(agent=agent, room=ctx.room)
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_baidu-1.1.0.post1.tar.gz.
File metadata
- Download URL: livekit_plugins_baidu-1.1.0.post1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
543d2f91323765518ba0695a4a5f056cd1f2f138ff532b889c70633f3784bdea
|
|
| MD5 |
742fe4d4cf5b2a16e094a8dc124da2f8
|
|
| BLAKE2b-256 |
99887a883d042b94df771c7c12c699388de815e6d62790b9ad7f20c6b39f98ee
|
File details
Details for the file livekit_plugins_baidu-1.1.0.post1-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_baidu-1.1.0.post1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f90c01e3dc19b42e603264b0475751673b77885201fd76041f565788d32ace0a
|
|
| MD5 |
8ac6ce7b3fd357516421cf824c2ff5c0
|
|
| BLAKE2b-256 |
cdff0e2a67503d133d5fa3151fb7f99e87a4b9b020a9cc86aa5a09aacbe65fad
|