liveavatar-demo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLiveAvatar Demos
LiveAvatar 演示
Three curated demos, each a real open-source repo. This skill does every mechanical step: clone, install, provision, configure, launch.
精选3个演示项目,均为开源仓库。本技能可完成所有机械步骤:克隆、安装、配置、启动。
What this skill cannot do — say this up front
本技能无法完成的操作——请提前说明
You cannot verify that the avatar talks. Every demo ends at a microphone and a human ear. Do not claim success you can't observe, and do not stall waiting for something you can't reach. Name these moments as you hit them:
| Moment | Why it's human-only |
|---|---|
| Supplying API keys | Cannot be fetched or guessed |
Demo 1: | Interactive |
| Demo 1: fill name + work email, click Chat with Wayne | The submit button is disabled until both fields are filled |
| Demos 2/3: grant browser mic permission, then speak | No mic, no conversation |
| Confirming the avatar spoke and lip-synced | Audio + video, in a human's browser |
| Vercel login / deploy (demo 1, Full level only) | Interactive auth |
Everything else is yours. Do it without narrating each command.
无法验证虚拟人是否发声。每个演示的最终环节都需要麦克风和人耳的参与。请勿做出无法验证的成功承诺,也不要因无法监测的环节而停滞。遇到以下环节时请明确告知用户:
| 环节 | 需人工操作的原因 |
|---|---|
| 提供API密钥 | 无法获取或猜测密钥 |
演示1: | 交互式 |
| 演示1:填写姓名+工作邮箱,点击Chat with Wayne | 提交按钮需填写完两个字段后才会启用 |
| 演示2/3:授予浏览器麦克风权限并讲话 | 无麦克风则无法进行对话 |
| 确认虚拟人发声并完成唇形同步 | 需要人类在浏览器中查看音频和视频 |
| Vercel登录/部署(仅演示1的完整版本) | 交互式身份验证 |
其余所有操作均由本技能完成,无需逐一说明每个命令。
Step 1: Get the LiveAvatar API key — before anything else
步骤1:获取LiveAvatar API密钥——优先完成
All three demos need it, and having it early removes most branching. Ask for it now, in your first message, alongside the catalog:
Grab an API key from https://app.liveavatar.com → Settings → API keys and paste it here. I'll take it from there.
Do not proceed past Step 3 without it. You may clone and install while waiting, so the user is one paste away from a running demo — say that's what you're doing.
Never write a placeholder or fake value into an env file. and both Python entrypoints treat whatever is in the file as authoritative, and a bogus key produces a 401 that looks like an account problem.
setup.mjs三个演示均需该密钥,提前获取可减少后续分支流程。请在第一条消息中,结合演示目录向用户索要密钥:
请从https://app.liveavatar.com → 设置 → API密钥页面获取API密钥并粘贴在此处,我将继续后续操作。
未获取该密钥前,请勿进入步骤3。可在等待用户提供密钥的同时完成克隆和安装操作,这样用户粘贴密钥后即可快速启动演示——请告知用户你正在进行这些准备工作。
切勿在环境文件中写入占位符或虚假值。及两个Python入口文件会将文件中的内容视为有效配置,无效密钥会返回401错误,看起来像是账户问题。
setup.mjsStep 2: Pick the Demo
步骤2:选择演示项目
Show this table unless the user already named one.
| # | Demo | What it does | Stack | Extra keys needed |
|---|---|---|---|---|
| 1 | AI Sales Agent | Avatar qualifies leads, writes a summary to Notion + Slack on hangup | Next.js 15 / TypeScript, Node 22+ | none for a local run; Anthropic + a public URL for the full sales brain |
| 2 | LiveKit Agent (LiveAvatar-hosted room) | Your own LiveKit STT→LLM→TTS pipeline driving the avatar. LiveAvatar owns the room | Python 3.10+ / LiveKit Agents | LiveKit Cloud key + secret |
| 3 | BYO LiveKit Agent | Same pipeline, avatar joins a room in your LiveKit project. Production-shaped | Python 3.10+ / LiveKit Agents | LiveKit Cloud key + secret + URL, |
Routing: fastest thing that talks → 1. Wants to see a voice pipeline, has LiveKit Cloud → 2. Already runs LiveKit rooms in production → 3. "Just show me anything" → 1.
Demos 2 and 3 are the same repo, two entrypoints. Wanting both means cloning once.
除非用户已指定项目,否则请展示以下表格:
| 序号 | 演示项目 | 功能说明 | 技术栈 | 所需额外密钥 |
|---|---|---|---|---|
| 1 | AI Sales Agent | 虚拟助手完成潜客资质审核,通话结束后将总结内容同步至Notion和Slack | Next.js 15 / TypeScript, Node 22+ | 本地运行无需额外密钥;完整销售功能需要Anthropic密钥及公网URL |
| 2 | LiveKit Agent(LiveAvatar托管房间) | 由自定义LiveKit STT→LLM→TTS流程驱动虚拟人,房间由LiveAvatar托管 | Python 3.10+ / LiveKit Agents | LiveKit Cloud密钥和密钥密码 |
| 3 | 自定义LiveKit Agent(BYO LiveKit Agent) | 流程与演示2相同,虚拟人加入你的LiveKit项目中的房间,适用于生产环境 | Python 3.10+ / LiveKit Agents | LiveKit Cloud密钥、密钥密码、URL,以及 |
路由规则:最快可运行的发声演示→1。用户希望查看语音流程且拥有LiveKit Cloud→2。用户已在生产环境中运行LiveKit房间→3。用户说“随便展示一个”→1。
演示2和3使用同一仓库的两个入口文件,若用户同时需要两者,只需克隆一次。
Costs — state this once, before launching
费用说明——启动前告知用户一次
- LiveAvatar sandbox sessions are free and duration-capped at roughly a minute. Demos 2 and 3 default to sandbox; demo 1 uses the shared public demo avatar.
- Demos 2 and 3 bill STT/LLM/TTS to the user's LiveKit Cloud project — including demo 2, where LiveAvatar owns the room. Room ownership and inference billing are separate. People assume otherwise. Demo 3 also bills RTC minutes.
- Demo 1 bills Anthropic tokens per turn, and only once the brain is wired.
- LiveAvatar沙箱会话免费,时长限制约为1分钟。演示2和3默认使用沙箱;演示1使用共享的公开演示虚拟人。
- 演示2和3的STT/LLM/TTS费用将计入用户的LiveKit Cloud项目——包括演示2中由LiveAvatar托管房间的情况。房间所有权与推理计费是分开的,用户通常会误以为两者绑定。演示3还会产生RTC分钟数费用。
- 演示1在启用完整销售功能后,将按对话次数消耗Anthropic令牌。
Step 3: Preflight
步骤3:预检
Run only the checks for the chosen demo. Report anything missing with its install command; don't install runtimes without asking.
Demo 1:
bash
node --version # need >= 22 (engines.node enforces it)
git --version
lsof -ti tcp:3003 # MUST be empty — see belowPort 3003 is pinned in both and . An occupied port is fatal, not a warning, and there is no auto-increment. If returns a PID, either free it or plan to bypass npm with — and remember the handoff URL changes with it.
devstartlsofnpx next dev --port <free>Demos 2 and 3:
bash
git --version
uv --version # install: brew install uvDo not gate on . reads from and selects a compatible interpreter itself — a system Python 3.9 is irrelevant. Checking it produces a false negative that aborts a setup which would have worked. If is genuinely unavailable, fall back to and say you did.
python3 --versionuv venvrequires-pythonpyproject.tomluvpython3.13 -m venv .venv && .venv/bin/pip install -e .Demo 3 also needs : (tap first if it doesn't resolve), then — interactive, hand it to the user.
lkbrew install livekit-clilivekit/livekitlk cloud auth仅针对所选演示项目运行检查。若检测到缺失项,请告知用户安装命令;未经询问请勿自动安装运行时环境。
演示1:
bash
node --version # 需要 >= 22(engines.node 已强制要求)
git --version
lsof -ti tcp:3003 # 必须为空——详见下文端口3003在和模式下均为固定端口。端口被占用会导致启动失败,而非警告,且无自动递增机制。若返回PID,请释放该端口或计划使用绕过npm,并注意交接URL会随端口变化。
devstartlsofnpx next dev --port <可用端口>演示2和3:
bash
git --version
uv --version # 安装命令:brew install uv无需检查。会从读取配置并自动选择兼容的解释器——系统中的Python 3.9版本不影响。检查Python版本会产生错误的否定结果,导致原本可成功的安装流程终止。若确实不可用,可回退至并告知用户你已采用该方案。
python3 --versionuv venvpyproject.tomlrequires-pythonuvpython3.13 -m venv .venv && .venv/bin/pip install -e .演示3还需要工具:(若无法解析,请先执行),然后运行——该步骤为交互式操作,请交给用户完成。
lkbrew install livekit-clitap livekit/livekitlk cloud authStep 4: Remaining Credentials
步骤4:剩余凭证
Ask for these in one message, after the demo is chosen — not before, since what's required depends on it.
| Demo | Also needed | Source |
|---|---|---|
| 1, local run | nothing | — |
| 1, full sales brain | | https://console.anthropic.com |
| 2 | | https://cloud.livekit.io → project → Settings → Keys |
| 3 | those two plus | same page |
For demo 1, read the Local-vs-Full section of its reference and pick a level before asking — asking for an Anthropic key the local run never uses blocks users who have only a LiveAvatar key.
Avatar ID: never ask. Both repos ship a working sandbox avatar in . Leave it.
.env.exampleOptional and demo-1-only, skip unless raised: + , .
NOTION_TOKENNOTION_DATABASE_IDSLACK_WEBHOOK_URL在用户选择演示项目后,一次性询问所需的额外凭证——不要提前询问,因为不同项目所需凭证不同。
| 演示项目 | 所需额外凭证 | 获取来源 |
|---|---|---|
| 1(本地运行) | 无 | — |
| 1(完整销售功能) | | https://console.anthropic.com |
| 2 | | https://cloud.livekit.io → 项目 → 设置 → 密钥 |
| 3 | 上述两个密钥 加上 | 同一页面 |
对于演示1,请先阅读参考文档中的“本地运行vs完整功能”部分并选择相应层级再询问凭证——若询问本地运行无需的Anthropic密钥,会阻碍仅持有LiveAvatar密钥的用户。
虚拟人ID:无需询问。两个仓库的文件中均包含可用的沙箱虚拟人ID,请保留该值。
.env.example可选且仅适用于演示1的凭证: + 、——除非用户提及,否则无需询问。
NOTION_TOKENNOTION_DATABASE_IDSLACK_WEBHOOK_URLWhere to clone
克隆路径
Default to relative to the current directory, and confirm the path before running . Never clone inside the user's project tree — if cwd is their project, go up and out. If the target exists and is non-empty, stop and ask.
../liveavatar-demos/<repo-name>git clone默认克隆至当前目录的相对路径,运行前请确认路径。切勿克隆至用户的项目目录内——若当前目录即为用户项目目录,请向上切换至外部目录。若目标路径已存在且非空,请停止操作并询问用户。
../liveavatar-demos/<仓库名称>git cloneStep 5: Set Up and Run
步骤5:配置与运行
Follow the matching reference. It has the exact commands, env layout, ready signal, and failure modes.
| Demo | Reference |
|---|---|
| 1 — AI Sales Agent | references/sales-agent.md |
| 2 — LiveKit hosted room | references/livekit-agent.md |
| 3 — BYO LiveKit | references/livekit-agent.md (BYO section) |
Rules for every demo:
Secrets go in , never , never a committed file. Both repos gitignore and ship .
.env.local.env.env.local.env.exampleWrite keys with an editor tool, not a shell command. Shell history and logs persist. The exception is demo 1's , which reads from the environment — the reference covers that case.
setup.mjsLIVEAVATAR_API_KEYCopying is not enough. Both files ship keys with empty values that are not equivalent to unset. The references name each one. Getting this wrong is the single most common way these demos die.
.env.example.env.exampleNever activate a venv. does not persist between your tool calls. Use every time.
source .venv/bin/activateuv run <command>Launch long-lived processes in the background and read the log rather than blocking on a foreground process. Interactive setup scripts are the exception — see the reference.
Report the ready signal you actually saw, then stop. Each reference names one. Every ready signal proves the process started, not that the avatar works. Do not extrapolate.
遵循对应参考文档的说明,其中包含确切的命令、环境变量配置、就绪信号及故障排查方式。
| 演示项目 | 参考文档 |
|---|---|
| 1 — AI Sales Agent | references/sales-agent.md |
| 2 — LiveKit托管房间 | references/livekit-agent.md |
| 3 — 自定义LiveKit | references/livekit-agent.md(BYO章节) |
所有演示项目的通用规则:
密钥请写入,切勿写入或已提交的文件。两个仓库均已将加入git忽略列表,并提供了文件。
.env.local.env.env.local.env.example使用编辑器工具写入密钥,而非Shell命令。Shell历史记录和日志会留存密钥。例外情况:演示1的会从环境变量读取——参考文档已覆盖该场景。
setup.mjsLIVEAVATAR_API_KEY仅复制文件是不够的。两个文件中的密钥值为空,这与未设置密钥并不等价。参考文档会列出每个需要配置的密钥。这是导致演示失败最常见的原因。
.env.example.env.example请勿激活虚拟环境。在工具调用之间不会持久生效。请始终使用。
source .venv/bin/activateuv run <命令>在后台启动长时运行的进程并读取日志,而非阻塞在前台进程。交互式安装脚本除外——请遵循参考文档说明。
报告实际检测到的就绪信号,然后停止操作。每个参考文档都会指定一个就绪信号。就绪信号仅证明进程已启动,不代表虚拟人可正常工作。请勿过度推断。
Step 6: Hand Off
步骤6:交接
Give exactly this, then stop:
- What the user must do now, concretely. Demo 1: open http://localhost:3003, fill in a name and work email, click Chat with Wayne. Demos 2/3: a browser tab opened automatically — allow the microphone, then speak.
- What you could not verify — that the avatar appears, speaks, and lip-syncs. Ask them to confirm.
- One customization pointer. Demo 1: prompt parts in . Demos 2/3:
src/lib/ai-sales/brain/prompt-parts/ininstructions=.src/agent.py - How to stop, and what's billing. The local dev server costs nothing. The billable thing is the avatar session — it ends when the browser tab closes or the process dies. Say which one applies.
Don't tour the codebase. They'll ask.
请准确告知以下内容,然后停止操作:
- 用户当前需完成的具体操作。演示1:打开http://localhost:3003,填写姓名和工作邮箱,点击**Chat with Wayne**。演示2/3:浏览器标签页会自动打开——允许麦克风权限,然后讲话。
- 无法验证的内容——虚拟人是否显示、发声并完成唇形同步。请用户确认。
- 一个自定义提示。演示1:目录下的提示语片段。演示2/3:
src/lib/ai-sales/brain/prompt-parts/中的src/agent.py配置项。instructions= - 停止方式及计费说明。本地开发服务器无费用。产生费用的是虚拟人会话——关闭浏览器标签页或终止进程后会话结束。请说明适用的终止方式。
无需引导用户浏览代码库,用户有需要会自行询问。
When Things Break
故障排查
Each reference has a gotchas section with the specific failure. General triage:
- Crash before any network call → an empty-but-present env var. Check (demos 2/3) first; it's the most common and its traceback names nothing relevant.
LOG_LEVEL - Avatar connects but is silent → missing context (), or an LLM configuration pointed at an unreachable URL. Silent failure, no error thrown.
opening_text - Crash on the user's first sentence (demos 2/3) → model weights never downloaded.
- 401 at session mint → bad or missing . This error is clear and quotes the request body; trust it.
LIVEAVATAR_API_KEY - Session rejected at mint → above the account tier's cap, or a production avatar ID in sandbox mode.
max_session_duration - Nothing in the browser → check the browser console before the server log. Usually mic permission.
If the symptom isn't in the reference's table, debug from the log, not the README.
每个参考文档的“注意事项”章节都列出了特定故障的排查方法。通用排查流程:
- 网络请求前崩溃 → 存在为空但已设置的环境变量。首先检查(演示2/3);这是最常见的情况,且其回溯信息未指向相关问题。
LOG_LEVEL - 虚拟人已连接但无声音 → 缺少上下文(),或LLM配置指向不可访问的URL。该故障无错误抛出,表现为静默失败。
opening_text - 用户首次讲话时崩溃(演示2/3) → 模型权重未下载。
- 会话创建时返回401 → 无效或缺失。该错误信息明确并会引用请求体,请以此为准。
LIVEAVATAR_API_KEY - 会话创建时被拒绝 → 超过账户层级限制,或在沙箱模式下使用生产环境虚拟人ID。
max_session_duration - 浏览器无内容显示 → 先检查浏览器控制台,再查看服务器日志。通常是麦克风权限问题。
若症状未出现在参考文档的表格中,请根据日志排查,而非依赖README。
Step 7: Collect Feedback
步骤7:收集反馈
Trigger once the demo is handed off, or if the user abandons after 3+ failed attempts at the same step. If you're blocked on credentials and nothing is running, skip it.
Follow the skill if it's available; if it isn't, skip silently rather than improvising a feedback channel. One line, and don't push if the user ignores it.
liveavatar-feedback在演示交接完成后触发,或用户在同一步骤尝试3次以上失败后触发。若因缺少凭证导致无法运行,请跳过该步骤。
若技能可用,请遵循该技能流程;若不可用,请静默跳过,不要自行创建反馈渠道。只需发送一条消息,若用户忽略则无需追问。
liveavatar-feedbackWhat to consult
参考资源
- references/sales-agent.md — AI Sales Agent: interactive setup script, local vs. deployed, Vercel, env reference
- references/livekit-agent.md — both LiveKit demos: common setup, hosted flow, BYO flow, worker deploy
- references/sales-agent.md — AI Sales Agent:交互式安装脚本、本地 vs 部署、Vercel、环境变量参考
- references/livekit-agent.md — 两个LiveKit演示:通用配置、托管流程、自定义流程、Worker部署