From 65ae2287d5cdda761c95a112e849fb643243c977 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Fri, 6 Mar 2026 14:38:59 +0800 Subject: [PATCH] Update documentation for assistant configuration and interaction models - Corrected phrasing in the introduction of RAS as an open-source alternative. - Added new documentation sections for voice AI and voice agents. - Enhanced the flowchart for assistant components to include detailed configurations. - Updated terminology for engine types to clarify distinctions between Pipeline and Realtime engines. - Introduced a new section on user utterance endpoints (EoU) to explain detection mechanisms and configurations. --- docs/content/concepts/assistants.md | 69 +++++++++++------------------ docs/content/concepts/index.md | 56 +++++++++++++---------- docs/content/index.md | 2 +- docs/content/roadmap.md | 5 ++- 4 files changed, 64 insertions(+), 68 deletions(-) diff --git a/docs/content/concepts/assistants.md b/docs/content/concepts/assistants.md index f22c4c8..2d560ff 100644 --- a/docs/content/concepts/assistants.md +++ b/docs/content/concepts/assistants.md @@ -11,32 +11,47 @@ ### 助手的组成 ```mermaid -flowchart TB +flowchart subgraph Assistant["助手"] - Identity[身份定义] - Models[模型配置] - Capabilities[能力扩展] - Behavior[行为控制] + direction TB + Prompts[指令配置] + Audio[语音配置] + Interaction[交互配置] + tool[工具配置] + knowledge[知识配置] + webhooks[webhooks] end - subgraph Identity + subgraph Prompts Name[名称] - Prompt[系统提示词] - Language[语言] + Prompt[提示词] + Opener[开场白] end - subgraph Models + subgraph Audio LLM[LLM 模型] ASR[ASR 模型] TTS[TTS 声音] end - subgraph Capabilities + subgraph Interaction Tools[工具调用] KB[知识库] end - subgraph Behavior + subgraph tool + Greeting[开场白] + Interruption[打断设置] + Output[输出模式] + end + + subgraph knowledge + Greeting[开场白] + Interruption[打断设置] + Output[输出模式] + end + + subgraph webhooks Greeting[开场白] Interruption[打断设置] Output[输出模式] @@ -192,38 +207,6 @@ flowchart LR --- -## 助手版本管理 - -### 草稿与发布 - -```mermaid -gitGraph - commit id: "创建助手" - commit id: "配置提示词" - commit id: "添加工具" - branch published - checkout published - commit id: "发布 v1" - checkout main - commit id: "修改提示词" - commit id: "调整参数" - checkout published - merge main id: "发布 v2" -``` - -- **草稿**: 可随时修改,仅供测试 -- **发布**: 正式上线,用于生产环境 - -### 配置导入导出 - -支持以 JSON 格式导入导出助手配置,便于: - -- 备份和恢复 -- 跨环境迁移 -- 团队共享模板 - ---- - ## 最佳实践 ### 1. 提示词工程 diff --git a/docs/content/concepts/index.md b/docs/content/concepts/index.md index aab0fda..43df59b 100644 --- a/docs/content/concepts/index.md +++ b/docs/content/concepts/index.md @@ -19,8 +19,8 @@ flowchart TB end subgraph Engine["交互引擎"] - Pipeline[管线式引擎] - Multimodal[多模态引擎] + Pipeline[Pipeline引擎] + Multimodal[Realtime引擎] end Session[会话 Session] @@ -47,24 +47,12 @@ flowchart TB | 配置项 | 说明 | |-------|------| | **名称** | 助手的显示名称 | -| **系统提示词** | 定义助手角色、行为、限制 | -| **LLM 模型** | 选择用于生成回复的大语言模型 | -| **ASR 模型** | 选择用于语音识别的模型 | -| **TTS 声音** | 选择用于语音合成的音色 | -| **工具** | 配置助手可调用的外部工具 | -| **知识库** | 关联的知识库(用于 RAG) | - -### 助手生命周期 - -```mermaid -stateDiagram-v2 - [*] --> Draft: 创建 - Draft --> Draft: 编辑配置 - Draft --> Published: 发布 - Published --> Draft: 取消发布 - Published --> Published: 更新配置 - Published --> [*]: 删除 -``` +| **指令配置** | 使用提示词指令定义助手角色、行为、限制 | +| **语音设置** | 包括语音识别模型,语音合成模型 | +| **交互设置** | 包括用户打断机器人的灵敏度,检测用户语句结束的灵敏度 | +| **工具配置** | 配置助手可调用的外部工具 | +| **知识配置** | 关联的知识库(用于 RAG) | +| **Webhooks** | 用于订阅助手的活动 | --- @@ -96,7 +84,7 @@ stateDiagram-v2 --- -## 管线式引擎 vs 多模态引擎 +## Pipeline引擎 vs Realtime引擎 RAS 支持两种引擎架构,适用于不同场景。 @@ -119,7 +107,7 @@ RAS 支持两种引擎架构,适用于不同场景。 - 延迟较高(累加延迟) - 需要协调多个服务 -### 实时交互引擎与多模态 (Realtime / Multimodal) +### 实时交互引擎 (Realtime) 实时交互引擎可连接 **OpenAI Realtime**、**Gemini Live**、**Doubao 实时交互引擎** 等,同样可连接工具。使用端到端模型直接处理: @@ -183,6 +171,28 @@ sequenceDiagram Note over Engine: 处理新输入 ``` +## 用户语句端点(EoU End-of-Utterance) + +**用户语句端点(EoU)** 指系统判断「用户已经说完」的时刻。在管线式引擎中,只有检测到 EoU 后,才会把当前轮次的转写文本送给 LLM 并触发回复,避免用户短暂停顿时就误判为说完。 + +### 检测方式 + +EoU 基于 **VAD(声音活动检测)** 的输出:在用户**连续静音**达到设定时长后触发一次 EoU。若静音期间用户再次说话,静音计时会重置,因此句间短暂停顿不会触发 EoU,只有用户真正停止说话后才触发。 + +| 概念 | 说明 | +|------|------| +| **静音阈值** | 连续静音超过该时长(毫秒)即判定为 EoU,对应配置如 `vad_eou_threshold_ms`(默认约 800ms) | +| **最短语音** | 若语音过短(如杂音),不触发 EoU,避免误判 | +| **一次一轮** | 每轮用户输入只产生一次 EoU,之后需重新检测语音再静音才会再次触发 | + +### 在管线中的位置 + +``` +用户语音 → [VAD] → [EoU 检测] → 静音达阈值 → 文本送 LLM → 回复 → [TTS] +``` + +助手配置中的 **「检测用户语句结束的灵敏度」** 即对应 EoU 的静音阈值:阈值越小,越容易判定为「说完」,响应更快但易在用户思考或短暂停顿时误触发;阈值越大,更稳但响应会稍慢。 + --- ## 工具调用 (Tool Calling) @@ -196,7 +206,7 @@ sequenceDiagram | 类型 | 说明 | 示例 | |------|------|------| | **Webhook** | 调用外部 HTTP API | 查询订单、预约日程 | -| **客户端工具** | 由客户端执行的操作 | 打开页面、显示表单 | +| **客户端工具** | 由客户端执行的操作 | 获取客户端地理位置、请求用户同意、打开客户端相机 | | **内建工具** | 平台提供的工具 | 代码执行、计算器 | ### 工具调用流程 diff --git a/docs/content/index.md b/docs/content/index.md index b5f6ccc..0dd2f8c 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -26,7 +26,7 @@ Realtime Agent Studio (RAS) 是一款以大语言模型为核心,构建实时交互音视频智能体的工作平台。支持管线式的全双工交互引擎和原生多模态模型两种架构,覆盖实时交互智能体的配置、测试、发布、监控全流程。 -可以将 RAS 看作 [Vapi](https://vapi.ai)、[Retell](https://retellai.com)、[ElevenLabs Agents](https://elevenlabs.io) 的**开源替代方案**。 +可以将 RAS 看作 [Vapi](https://vapi.ai)、[Retell](https://retellai.com)、[ElevenLabs Agents](https://elevenlabs.io) 的开源替代方案。 --- diff --git a/docs/content/roadmap.md b/docs/content/roadmap.md index 1cd594f..bd96694 100644 --- a/docs/content/roadmap.md +++ b/docs/content/roadmap.md @@ -110,4 +110,7 @@ * [Vapi](https://vapi.ai) * [Retell](https://www.retellai.com) * [Sierra](https://sierra.ai/product/voice) -* [Bolna](https://platform.bolna.ai) \ No newline at end of file +* [Bolna](https://platform.bolna.ai) + +### 文档 +* [Voice AI & Voice Agents](https://voiceaiandvoiceagents.com/) \ No newline at end of file