> 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/unity-plugin-beta-overview/features/emotion/emotion-profile.md). Agents can also search and read this documentation through its [MCP server](https://docs.convai.com/api-docs/~gitbook/mcp).

# 情绪配置文件

所有可配置参数尽在一处——表情上升和下降的速度、微爆发如何增加自然感，以及中性交替如何防止面部僵住。

## 使用 ConvaiEmotionProfile 调整情绪行为

`ConvaiEmotionProfile` 是情绪系统的核心配置资源。它控制表情进入和退出的速度、每种新情绪是否伴随短暂的强度爆发、系统如何避免面部持续保持某个姿势而僵住，以及哪些输出绑定会将分数传递到角色的网格或 Animator。每个参数都有合理的默认值，你可以先使用随附的示例，再逐步调整。

## 创建配置文件资源

在 Project 窗口中，右键点击 `Assets/` 文件夹内，然后选择：

**创建 → Convai → Embodiment → Emotion Profile**

系统会创建一个名为 `ConvaiEmotionProfile` 的新资源。将其重命名为能描述用途的名称（例如， `NPC_Guard_EmotionProfile`），然后将其分配给角色的 **配置文件** 字段，该字段位于角色的 `ConvaiEmotionController` 组件上。

{% hint style="info" %}
如果想直接开始而不创建资源，可以分配随附的 `ConvaiSamplesShared_EmotionProfile` ，它位于 `Packages / Convai SDK for Unity / SamplesShared / Resources / Embodiment / Modules / Emotion`。如果想编辑其中的值，请先复制该资源——程序包中的资源为只读。
{% endhint %}

## 分类体系

<table><thead><tr><th width="121.5">字段</th><th width="225.49993896484375">默认值</th><th>说明</th></tr></thead><tbody><tr><td><code>taxonomy</code></td><td><em>（无 — 内置 Plutchik 分类）</em></td><td>可选 <code>EmotionTaxonomyAsset</code> ，用于定义可识别的情绪标签，以及如何将服务器标签解析为规范名称。留空则使用内置的九种情绪 Plutchik 集合。</td></tr></tbody></table>

该分类体系还会为每种情绪提供嘴部影响提示，供 LipSync 混合层使用。有关内置集合及如何创建自定义集合的完整说明，请参阅“情绪分类体系”。

## 平滑

服务器传来的情绪分数不会立即应用。累加器会在每一帧进行指数平滑，使表情自然融合，而不是在不同数值之间突然跳变。

<table><thead><tr><th width="168.5">字段</th><th width="120.99993896484375">范围</th><th width="104.49993896484375">默认值</th><th>说明</th></tr></thead><tbody><tr><td><code>lerpSpeed</code></td><td>0.1 – 20</td><td><strong>5</strong></td><td>分数向目标值上升的速度。值越高，变化越迅速；值越低，变化越缓慢。</td></tr><tr><td><code>decaySpeed</code></td><td>0.1 – 20</td><td><strong>2</strong></td><td>移除目标值后，分数回落至零的速度。默认情况下，衰减速度有意设置得比上升速度慢，让情绪得以自然延续一段时间。</td></tr><tr><td><code>intensityOffset</code></td><td>-0.25 – 0.25</td><td><strong>0</strong></td><td>在强度值进入累加器之前，添加到每个归一化强度值上的固定偏移。正值会增强所有情绪的表现；负值则会减弱它们。</td></tr></tbody></table>

**指数平滑的工作方式：** 每一帧，当前分数都会向目标值移动一部分剩余距离。当 `lerpSpeed = 5`时，分数大约会在一秒内覆盖该距离的 99%。将速度加倍，到达完整表情所需的时间便会减半。目标值降为零时，衰减也使用相同机制。

## 微表情爆发

当新情绪到来时，累加器可以短暂地让分数超调——即短暂高于稳定状态的水平——随后再逐渐回落。这样能让表情以更有冲击力、更自然的方式出现，屏幕呈现效果也远胜于简单的线性渐变。

<table><thead><tr><th width="196.49993896484375">字段</th><th width="126.5">范围</th><th width="96.5">默认值</th><th>说明</th></tr></thead><tbody><tr><td><code>microBurstEnabled</code></td><td>—</td><td><strong>true</strong></td><td>完全启用或禁用爆发效果。</td></tr><tr><td><code>microBurstDuration</code></td><td>0.05 – 1.5 秒</td><td><strong>0.25 秒</strong></td><td>超调包络持续的时长，之后分数会衰减至其持续值。</td></tr><tr><td><code>microBurstOvershoot</code></td><td>1.0–3.0×</td><td><strong>1.4×</strong></td><td>应用于情绪爆发峰值分数的峰值倍率。值为 1.4 表示该表情会短暂达到其持续强度的 140%。</td></tr><tr><td><code>microBurstThreshold</code></td><td>0–1</td><td><strong>0.15</strong></td><td>触发爆发所需的最小分数变化量。低于此阈值的小幅波动会被平滑处理，不触发爆发，从而避免细微情绪变化导致画面抖动。</td></tr></tbody></table>

{% hint style="info" %}
对于平静、专业的模拟角色，可将 `microBurstOvershoot` 调低至 1.1–1.2，或完全禁用爆发。对于充满活力或戏剧性强的角色，最高可使用 1.8。
{% endhint %}

## 中性表情交替

如果角色持续接收到某种情绪信号（例如，在长篇解释中始终保持“好奇”），最终可能会出现僵化的表情，破坏沉浸感。中性表情交替功能通过定期将当前表情淡化至中性，再恢复原状来解决这一问题。即使底层情绪始终不变，也能呈现细微而逼真的变化。

<table><thead><tr><th width="241">字段</th><th width="113">范围</th><th width="99.49993896484375">默认值</th><th>说明</th></tr></thead><tbody><tr><td><code>neutralAlternationEnabled</code></td><td>—</td><td><strong>true</strong></td><td>启用或禁用交替系统。</td></tr><tr><td><code>alternationMinInterval</code></td><td>0.5–30 秒</td><td><strong>3 秒</strong></td><td>开始淡化至中性之前，当前表情保持的最短时间。</td></tr><tr><td><code>alternationMaxInterval</code></td><td>0.5–30 秒</td><td><strong>7 秒</strong></td><td>最长保持时间。每个周期的实际间隔会在最小值和最大值之间随机选取。</td></tr><tr><td><code>alternationBlendDuration</code></td><td>0.05–5 秒</td><td><strong>1 秒</strong></td><td>淡化至中性并恢复所需的时间。较短的时长会产生清晰、刻意的重置效果；较长的时长则几乎难以察觉。</td></tr><tr><td><code>alternateOnlyWhileTalking</code></td><td>—</td><td><strong>false</strong></td><td>启用后，仅当角色正在说话时才会进行表情交替。如果希望角色在轮次之间的停顿期间更稳定地保持表情，此选项会很有用。</td></tr></tbody></table>

{% hint style="warning" %}
设置 `alternationMinInterval` 和 `alternationMaxInterval` 设为相同的较低值（例如，都设为 1 秒），会让面部看起来像是在闪烁，而非自然交替。两个值之间至少应相差 2–3 秒；对于大多数角色，最小值应保持在 2 秒以上。
{% endhint %}

## 输出绑定

配置文件中的 **Blendshape 绑定** 和 **Animator 绑定** 部分定义了每帧接收平滑后情绪分数的网格 Blendshape 和 Animator 浮点参数。这些内容配置为 `EmotionSlotBinding` 条目列表——每个输出通道中的每种情绪各占一个槽位。

字段的完整定义、针对特定绑定骨架的指导，以及预构建的 `RealisticEmotionSlots` 工厂方法，请参阅 [输出绑定](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin-beta-overview/features/emotion/output-bindings.md).

## 总结

`ConvaiEmotionProfile` 将所有平滑处理、微爆发、表情交替和输出配置整合到一个可移植资源中，方便你在多个 NPC 预制件之间共享。接下来可参阅 [输出绑定](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin-beta-overview/features/emotion/output-bindings.md) 了解如何将平滑后的分数应用到角色面部；也可参阅 [情绪分类体系](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin-beta-overview/features/emotion/emotion-taxonomy.md) 了解并自定义情绪词汇。


---

# 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/unity-plugin-beta-overview/features/emotion/emotion-profile.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.
