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

Uploaded Python 3

File details

Details for the file livekit_plugins_baidu-1.1.2.post0.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.1.2.post0.tar.gz
Algorithm Hash digest
SHA256 28a138ea541e3ccf53454103467d545e13fcc44b85b13896e3f2a8215b53a629
MD5 83f84392ba6fe744ff7180e6f2026386
BLAKE2b-256 63e2e79fbf23a22cd70c9382a74dae3af6f3665baf38cdb2a98dab7839849963

See more details on using hashes here.

File details

Details for the file livekit_plugins_baidu-1.1.2.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_baidu-1.1.2.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 166cb11a7d2607be03b1464b119c386d4565e6a28de847118e2b34840a5d27b1
MD5 35874a7020cd114ea5bd920adbe7213a
BLAKE2b-256 331fb2c89d5a8e4f5a17c4b78bbee4cc0e40007ea996a65927214d3369829b1f

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