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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.0.23.tar.gz
Algorithm Hash digest
SHA256 e613788a1a5b6c915d207736759eae514449cdc64db18345a5b7c1dd51486cd5
MD5 96c6c988b53896560e5698fca0de35ec
BLAKE2b-256 d0b8ba2d99fad0a4e25d6e71b2088bc1332f80984a47ca2c918866f565a750d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 224c2f0e3d398e246c2d6ff54bce7c43be1b2d25634f55c640c278a12dee674b
MD5 8e98b02636c8da83fea724022026c154
BLAKE2b-256 65438f83901dfdfde4d60854bb40c54022d7638f4c2a04362d583acf43ea7319

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