Runway 数字人接入 LiveKit 语音智能体的配置要点
该指南说明在 LiveKit Agents 中接入 Runway Characters 数字人所需的环境变量、头像标识选择规则与主要参数,并指出语音合成设置会覆盖角色原有声音配置。
LiveKit docs + 构建代理 + 模型 + 虚拟造型 + 运行道 --- # 运行道字符集成指南 > 如何为LiveKit Agents使用Runway虚拟变形器插件. 可在下列网址查阅: - [x] 节点.js - [x] Python 键 ## 概览 [运行道字符](https://runwayml.com/product/characters) 提供光现实化和动画化的人物全对话表达式. 您可以使用开源 Runway 集成 LiveKit Agents 在您的声音 AI app 中添加数字化的变形器. [视频:神通:音乐-超级明星](https://static.livekit.io/video/docs-avatar-demos/demo-runway-expressive.mp4) ### 安装 **Python 键**: ```shell uv add "livekit-agents[runway]~=1.8" ``` --- **节点.js**: ```shell pnpm add @livekit/agents-plugin-runway ``` ### 认证 Runway 插件需要一个 [运行道 API 密钥](https://docs.dev.runwayml.com/guides/setup/#create-a-key). 设定 `RUNWAYML_API_SECRET` 在您的帐号中 `.env` 文档。 ### 阿凡达设置 Runway插件需要自定义的avatar ID或预设的avatar ID,在avatar会话中通过. `avatar_id` 财务报告和财务报告 `preset_id` 分别通过 。 `RunwayException` 如果您都通过,或者没有。您可以在运行道上浏览和创建字符 [开发者门户网站](https://dev.runwayml.com/). 为以下步骤选择一个Avatar ID或预设Avatar ID. > ℹ️ **说明** > > LiveKit TTS 设置将取代为 Runway 字符配置的选定声音和人物. ### 使用量 使用插件在一个 `AgentSession`。例如,您可以在 [语音 AI 快速启动](https://docs.livekit.io/agents/start/voice-ai.md). **Python 键**: ```python from livekit import agents from livekit.agents import AgentServer, AgentSession from livekit.plugins import runway server = AgentServer() @server.rtc_session(agent_name="my-agent") async def my_agent(ctx: agents.JobContext): session = AgentSession( # ... stt, llm, tts, etc. ) avatar = runway.AvatarSession( avatar_id="...", # ID of the custom Runway character to use ) # Start the avatar and wait for it to join await avatar.start(session, room=ctx.room) # Start your agent session with the user await session.start( # ... room, agent, room_options, etc.... ) ``` --- **节点.js**: ```typescript import { voice } from '@livekit/agents'; import * as runway from '@livekit/agents-plugin-runway'; const session = new voice.AgentSession({ // ... stt, llm, tts, etc. }); const avatar = new runway.AvatarSession({ avatarId: '...', // ID of the custom Runway character to use }); // Start the avatar and wait for it to join await avatar.start(session, room); // Start your agent session with the user await session.start({ // ... room, agent, room_options, etc. }); ``` 预览 [代理主控台](https://docs.livekit.io/testing/agent-console.md) 或前端 [启动程序](https://docs.livekit.io/agents/start/frontend.md#starter-apps) 即你建造的。 ### 参数 本节介绍一些可用的参数。 [插件引用](https://docs.livekit.io/reference/python/livekit/plugins/runway/index.html.md#livekit.plugins.runway.AvatarSession) 用于完整列出所有可用的参数。 - **`avatar_id`** _(字符串)_(可选):自定义 Runway 字符的 ID。正好通过其中之一 `avatar_id` 或 时 间 `preset_id`。见 [阿凡达设置](#avatar) 详细情况。 - **`preset_id`** _(字符串)_(可选):预设的运行道字符的ID。正好通过其中之一 `avatar_id` 或 时 间 `preset_id`。见 [阿凡达设置](#avatar) 详细情况。 - **`max_duration`** _(int)_(可选):最长会话时间以秒计. ## 追加资源 以下资源提供更多信息,介绍与LiveKit Agents使用Runway. - **[运行道文件](https://docs.dev.runwayml.com/)**(原始内容存档于2019-03-21). Runway's full Docs site. - **[代理主控台](https://docs.livekit.io/testing/agent-console.md)**:一个测试您的阿凡达代理的虚拟工作台. - **[前端启动程序](https://docs.livekit.io/agents/start/frontend.md#starter-apps)**: 备用前端应用,并有Avatar支持. --- 这份文件是在2026 - 12 - 02T07: 47 :43.963Z. 本文件的最新版本见: [https://docs.livekit.io/agents/models/avatar/plugins/runway.md](https://docs.livekit.io/agents/models/avatar/plugins/runway.md). 要探索所有 LiveKit 文档,请参见 [页:1](https://docs.livekit.io/llms.txt).
查看原始来源