> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/validate-your-setup.md).

# 验证你的设置

通过插件、组件、音频和 API 密钥检查清单，确认你的 Convai Unreal Engine 设置在添加功能之前已正常工作。

使用此页面确认你的 Convai 设置的每个部分都在正常工作，然后再继续添加功能。请按顺序完成每个部分。任一步失败通常都指向一个具体问题，并且有明确的修复方法。

### 插件检查

| 检查      | 如何验证                                                  |
| ------- | ----------------------------------------------------- |
| 插件已启用   | 前往 **Edit > Plugins**，搜索 `Convai`，并确认 **已启用** 复选框已勾选。 |
| 工具栏图标可见 | 插件加载后，Convai 图标会出现在 Unreal Editor 工具栏中。               |
| 无加载错误   | 该 **输出日志** 没有显示提及 `Convai` 或 `AudioCapture` 在编辑器启动时。  |

### API 密钥检查

| 检查    | 如何验证                                                           |
| ----- | -------------------------------------------------------------- |
| 已登录   | 打开 Convai 编辑器窗口（点击 Convai 工具栏图标），并确认已显示你的账户详情。                 |
| 密钥已存储 | `UConvaiSettings.API_Key` 已填充——可在 **编辑 > 项目设置 > 插件 > Convai**. |

如果你尚未登录，请参见 [配置你的 API 密钥](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/configure-your-api-key.md).

### 组件检查

| 检查                        | 如何验证                                                             |
| ------------------------- | ---------------------------------------------------------------- |
| 角色已添加 Convai Chatbot      | 打开角色蓝图并确认 `UConvaiChatbotComponent` 出现在 **组件** 面板。               |
| 角色 ID 已设置                 | 选中 **Convai 聊天机器人** 组件并确认 **角色 ID** 字段不为空，并与仪表板中的某个角色匹配。         |
| 玩家 Pawn 已添加 Convai Player | 打开玩家 Pawn 蓝图并确认 `UConvaiPlayerComponent` 出现在 **组件** 面板。          |
| 已存在 Face Sync（如果使用口型同步）   | 确认 `UConvaiFaceSyncComponent` 位于角色蓝图中，并且 **口型同步模式** 与你的骨骼设置正确匹配。 |

### 音频检查

| 检查             | 如何验证                                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------------------------------------ |
| 麦克风可用          | 按 **F10** 在播放模式下打开设置面板，然后查看并测试可用的麦克风设备。或者，在运行时调用 `GetAvailableCaptureDeviceNames()` 在 `UConvaiPlayerComponent` 并确认列表不为空。 |
| 默认设备可打开        | 进入播放模式并确认 `GetIsStreaming()` 返回 `true` 在触发按住说话或启用免提模式后。                                                                  |
| 已授予 Android 权限 | 在 Android 上，确认 `android.permission.RECORD_AUDIO` 权限已在开始对话之前请求并授予。                                                        |

### 对话检查

在所有其他检查都通过后运行此检查。

{% stepper %}
{% step %}

#### 进入播放模式

按 **播放** 在 Unreal Editor 工具栏中。
{% endstep %}

{% step %}

#### 开始对话

按住按键说话（默认： **T**）并说一句简短的话，然后松开。或者，在聊天小部件中输入消息并按下 **按 Enter**.
{% endstep %}

{% step %}

#### 观察角色状态

当角色在说话时， `GetIsTalking()` （“正在说话”）在 `UConvaiChatbotComponent` 返回 `true`。当会话处于活动状态时， `IsInConversation()` 返回 `true`.

添加 **打印字符串** 在 Blueprint 中连接到这些函数的节点，可用于在视口中观察状态转换。 `IsListening()` 和 `IsProcessing()` 已在 Blueprint 中暴露，但目前返回 `false` 在插件源代码中。
{% endstep %}

{% step %}

#### 确认音频输出

角色会发出可听见的响应。如果已配置口型同步，角色的嘴巴会与语音同步移动。
{% endstep %}
{% endstepper %}

{% hint style="success" %}
当验证通过时，角色会以音频作出响应，并且——如果已配置——会进行口型同步。继续前往功能页面以添加动作、情绪、动态上下文和其他能力。
{% endhint %}

### 常见失败点

#### 角色完全没有回应

**症状：** 角色从未对语音或文本输入生成响应。

**原因：** API 密钥未设置，或缺少角色 ID。

**修复：** 参见 [配置你的 API 密钥](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/configure-your-api-key.md)；确认 **角色 ID** Chatbot 组件中的字段。

**验证：** 进入播放模式并发送一句简短的话。角色会发出可听见的响应。

#### 角色没有音频输出

**症状：** 角色似乎在处理输入，但没有生成语音音频。

**原因：** 音频输出设备问题，或会话尚未启动。

**修复：** 确认 `bAutoInitializeSession` 是 `true` 在 Chatbot 组件上，或者调用 `StartSession()` 手动。

**验证：** `GetIsTalking()` 返回 `true` 在角色响应时。

#### 角色听不到玩家

**症状：** 角色从不对麦克风输入作出反应。

**原因：** 未捕获麦克风，或缺少 Player 组件。

**修复：** 确认 `UConvaiPlayerComponent` 位于 Pawn 上；请参见 [配置麦克风](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/configure-the-microphone.md).

**验证：** `GetIsStreaming()` 返回 `true` 在按住说话或 VAD 激活之后。

#### 口型同步不播放

**症状：** 有音频播放，但角色的嘴巴不动。

**原因：** 缺少 Face Sync 组件，或口型同步模式错误。

**修复：** 添加 `UConvaiFaceSyncComponent` 并设置正确的 `LipSyncMode` 以匹配你的骨骼设置。

**验证：** 进入播放模式并确认在说话时嘴部移动。

#### OnFailureEvent 触发

**症状：** 该 `OnFailureEvent` 委托在对话期间触发。

**原因：** 网络错误或角色 ID 无效。

**修复：** 检查 **输出日志** 以了解详细信息；验证网络访问和角色 ID。

**验证：** 修复报告的错误后重试。

### 下一步

{% content-ref url="/pages/ddab80eff30a95a57bb3cec04bc4566233e30263" %}
[配置麦克风](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/configure-the-microphone.md)
{% endcontent-ref %}

{% content-ref url="/pages/2f681ae01ba11fe882d6b331cca0444e0a06402d" %}
[配置角色音频](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/configure-character-audio.md)
{% endcontent-ref %}

{% content-ref url="/pages/9b983ed32e78e3fecceef1f1ca84663abe05edca" %}
[配置对话输入](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/configure-conversation-input.md)
{% endcontent-ref %}

{% content-ref url="/pages/16dba40249f8c38f0e33f50c10a68569851148b6" %}
[添加聊天 UI](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/add-the-chat-ui.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/validate-your-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
