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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.2.3.tar.gz
Algorithm Hash digest
SHA256 ee1bed46d6744538f1678756466385ef603ea02fc191874f3616f55b38a809f0
MD5 adf31ce4f18a05fdd3871031eb8217c1
BLAKE2b-256 5cd8f164e40a3ac3b65a001cfcc27b973b0b0b60fb6b144cd9c4023825672776

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fe51de656fed7d40ebcacd37fc23ce5466ffca74d3762d17cba968fd64cb69be
MD5 f693c50a556f9f1f9c14defec26ec864
BLAKE2b-256 d10dd7316ce92d4e081bd3dbdc3a9b00bf1edf07fa063bfa67ff24665d18de78

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