> 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).

# 口型同步快速入门

将 Convai Face Sync 组件和 Convai 动画类添加到 MetaHuman 角色，并在编辑器中运行时听到口型同步语音。

我们将为一个已经附加了一个 `Convai Chatbot` 组件。最终，在 Play 模式下与角色对话时，其嘴部和面部将与回复音频同步动画。

### 前提条件

* 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**，将 **唇形同步模式** 到 `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 蓝图中，选择 **身体** 骨骼网格组件。在 **详情** 面板中，找到 **动画类** 在 **动画**。将其设置为 `Convai_MetaHuman_BodyAnim`.
{% endstep %}

{% step %}

#### 设置面部动画类

选择 **面部** 骨骼网格组件。在 **详情** 面板中，找到 **动画类**。将其设置为 `Convai_MetaHuman_FaceAnim`.
{% endstep %}

{% step %}

#### 编译并保存

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

### 运行角色

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

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

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

* **唇形同步模式** 在 `Convai Face Sync` 组件已设置为 `MetaHuman Blendshapes`.
* **动画类** 在 **面部** 网格是 `Convai_MetaHuman_FaceAnim` 并且在 **身体** 网格是 `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" %}
[Face Sync 组件参考](/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 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/features/lip-sync/lip-sync-quick-start.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.
