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.1.5.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.1.5-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.1.5.tar.gz
Algorithm Hash digest
SHA256 010f19d59fe091ee3c19da9bbd396eed03fec7be7ca1fa7e60795f817fd3663d
MD5 0250e63281dd146f254c797139df45a5
BLAKE2b-256 523817275ade76b2664bc0e9a0d601133edb7a12c9beca50af7b8d0cdf96727b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 be7ec3e2192178cc992d79b78ad4c9598864fa87dff071228047aef60cbcd45e
MD5 c1a722d36d49eab5b7d224ea2176f272
BLAKE2b-256 d0124111aa8273224e1003c3988a85dbed8e2f1229d967b347258903ebc85879

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