> 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/features/lip-sync/lip-sync-quick-start.md).

# 口型同步快速入门

我们将为一个已经具有一个……的 MetaHuman 角色添加口型同步 `Convai Chatbot` 组件已附加。最后，在播放模式下与角色对话时，它的嘴部和面部将会随着回复音频同步动画。

### 先决条件

* Convai Unreal Engine 插件已安装，并已配置 API 密钥。
* 你的关卡中有一个 MetaHuman Actor，并且有一个正常工作的 `Convai Chatbot` 组件（角色会说话，但面部尚未动画）。

如果你是从零开始，请先完成 [设置 MetaHuman 角色](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/set-up-a-metahuman-character.md) ——该指南涵盖了完整的 MetaHuman 导入和 Convai 组件设置。

### 添加 Face Sync 组件

{% stepper %}
{% step %}

#### 打开 MetaHuman 蓝图

在 **内容浏览器**，打开你的 MetaHuman Actor 的蓝图（例如 `BP_MyMetaHuman`）。选择 **组件** 面板中分配。
{% endstep %}

{% step %}

#### 添加 Convai Face Sync

点击 **添加** 中创建该资源 **组件** 面板并搜索 `Convai Face Sync`。选择它以将组件添加到 Actor。
{% endstep %}

{% step %}

#### 设置口型同步模式

选中 `Convai Face Sync` 组件后，打开 **详细信息** 面板。在 **Convai | LipSync**，将 **Lip Sync Mode** 设为 `MetaHuman Blendshapes`.

Blendshapes 是用于面部运动的网格形状目标，例如张嘴和嘴唇卷曲。此设置会告诉插件驱动 MetaHuman 曲线集。
{% endstep %}

{% step %}

#### 编译并保存

点击 **编译** 然后 **保存** 在蓝图编辑器工具栏中。该 **组件** 面板现在会显示一个 `Convai Face Sync` 位于 Actor 根节点下的条目。
{% endstep %}
{% endstepper %}

### 分配 Convai 动画类

{% hint style="info" %}
Convai 插件随附两个为 MetaHuman 角色预先构建的动画类。分配它们会将来自 `Convai Face Sync` 组件的口型同步数据连接到角色的面部和身体网格，以便 AnimGraph 可以在每个 tick 应用它。
{% endhint %}

这些动画类位于 `MetaHumans/Animations/` (`ConvAI > MetaHumans > Animations` 中创建该资源 **内容浏览器**）。在 MetaHuman 骨骼网格组件上分配它们。

{% stepper %}
{% step %}

#### 设置身体动画类

在 MetaHuman 蓝图中，选择 **Body** 骨骼网格组件。在 **详细信息** 面板中，找到 **Anim Class** 在 **Animation**下。将其设置为 `Convai_MetaHuman_BodyAnim`.
{% endstep %}

{% step %}

#### 设置面部动画类

选择 **Face** 骨骼网格组件。在 **详细信息** 面板中，找到 **Anim Class**下。将其设置为 `Convai_MetaHuman_FaceAnim`.
{% endstep %}

{% step %}

#### 编译并保存

点击 **编译** 然后 **保存** 在蓝图编辑器中。
{% endstep %}
{% endstepper %}

### 运行角色

进入播放模式并与角色发起对话。

{% hint style="success" %}
角色的嘴部和面部 blendshapes 应会与其语音同步动画。你会看到下颌、嘴唇和脸颊曲线在角色说话时驱动 MetaHuman 面部。
{% endhint %}

如果嘴部没有动，请确认：

* **Lip Sync Mode** 在该 `Convai Face Sync` 组件已设置为 `MetaHuman Blendshapes`.
* **Anim Class** 在该 **Face** 网格是 `Convai_MetaHuman_FaceAnim` 并且在 **Body** 网格是 `Convai_MetaHuman_BodyAnim`.
* 该 `Convai Chatbot` 同一 Actor 上的组件具有有效的角色 ID，且插件可以连接到 Convai。

参见 [排查口型同步问题](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/lip-sync/troubleshoot-lip-sync.md) 以获取详细的症状与修复指南。

### 下一步

{% content-ref url="/pages/713990439742181b882d6f2ca1521bb051a162be" %}
[口型同步的工作方式](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/lip-sync/how-lip-sync-works.md)
{% endcontent-ref %}

{% content-ref url="/pages/8b7003d8fdf40c7b56b0fd2a54376bfc5105903c" %}
[面部同步组件参考](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/lip-sync/face-sync-component-reference.md)
{% endcontent-ref %}

{% content-ref url="/pages/f0a9565e073a000fe0ed7df2961660e00793150b" %}
[设置 MetaHuman 角色](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/getting-started/set-up-a-metahuman-character.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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/lip-sync/lip-sync-quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
