Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_baidu-1.0.17.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_baidu-1.0.17-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_baidu-1.0.17.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.0.17.tar.gz
Algorithm Hash digest
SHA256 b48fe981cf1bbdcc74bd9fdf0dc618b0dd0d1ca2c9954dd1ed83b3f2e01ba890
MD5 d728dc374fc75608229a0bb53ee857f6
BLAKE2b-256 065d628b1c84485bda2b7c3d4e403565d47ae3aeef2ac8f830be0a6a8adb0aa6

See more details on using hashes here.

File details

Details for the file livekit_plugins_baidu-1.0.17-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 72dab455afc1721d7bf33ab76879a8da0a57b3ef258f17c39d8b515046716b63
MD5 c0ed5c4d23d4736066c9c5785600f4ea
BLAKE2b-256 2afb23aeb7440df0288eaffbc72a9aa4839a07cda29840b342d9aa0060fbab84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page