# Quick Start - Shape Keys

{% embed url="<https://youtu.be/eRGC6uxhwKM>" %}

## ⚡ Quick Start: Shape Keys

This guide will help you set up your first lip sync animation using **Blender's Shape Keys**.

Shape Keys mode is ideal for 3D models with no facial Rigs.

### 🎨 What You Need

* A character with at least one visible face
* Shape Keys representing phonemes
* An audio file (e.g., `.wav`, `.mp3`, `.mp4`, etc.)

{% hint style="info" %}
You need to define your own Shape Keys.&#x20;

Sadly, this is a thing Lip Sync cannot automate.
{% endhint %}

***

### 🪄 Step-by-Step Guide

#### Configure Language

* In the `Lip Sync` panel, select your **Language Model**

<figure><img src="/files/WtlsdBbRKwmxpCArgIr8" alt="" width="375"><figcaption><p>Lip Sync works with ~25 languages</p></figcaption></figure>

{% hint style="info" %}
Lip Sync will download your Language Model and store it in cache so you won't have to download it again.

Models are downloaded from <https://alphacephei.com/vosk/models>. Only **small sized models** are downloaded.
{% endhint %}

#### Add Lip Sync to your Model

* Click on **Add Lip Sync**<br>

<figure><img src="/files/ZQ1NcqOQUQBn9BaNiFg0" alt="" width="318"><figcaption></figcaption></figure>

#### Set Up Animation type

<figure><img src="/files/VahB7qLP9hl7pWyLayq8" alt=""><figcaption><p>Character made by Blender Studio &#x3C;3</p></figcaption></figure>

* Ensure that Animation Type is set to **Shape Keys**

#### Viseme Settings

This is the most tedious part.  You have to manually assign **Shape Keys** to **Visemes**.

<figure><img src="/files/7ghFikhUTinGmw85Do55" alt=""><figcaption><p>Use Drop-down lists to assign your Shape Key to corresponding Viseme</p></figcaption></figure>

{% hint style="success" %}
You can use the **same Shape Key** for **different Visemes.** \
It can be useful if you only have a few Shape Keys for your character.
{% endhint %}

{% hint style="info" %}
`sil` viseme is the position for "Silence".&#x20;

`UNK` viseme is the position for unrecognized phonemes.
{% endhint %}

#### Animation Settings

Animation settings enable you to fine tune how Keyframes are inserting.

<figure><img src="/files/bjauIT8z9mTrn5NfHSyE" alt=""><figcaption><p>Fine tune your animation</p></figcaption></figure>

<table><thead><tr><th width="169">Settings</th><th width="365">Description</th><th>Infos</th></tr></thead><tbody><tr><td>Lip Close Duration</td><td>Time required to close your character mouth. It will be used when a silence is detected and insert sil keyframe accordingly</td><td></td></tr><tr><td>In between</td><td><p>Minimum Threshold between two keyframes. </p><p>If a keyframe should be inserted before, it will be ignored.</p><p><br><em>e.g: 417ms means that next keyframe will be at least at 417ms from the previous one.</em> </p></td><td><p>Decreasing this value will ensure you to animate all phonemes but may result in jerky motion. </p><p><br>Increasing this value will give a smoother motion but sync will be less precise.</p></td></tr><tr><td>Silence</td><td>Time to have between 2 words to be considered as a "Silence".</td><td>Too short value will force you character to close their mouth often.<br><br>Too high value will force your character to have longer mouth transition between two words. </td></tr></tbody></table>

{% hint style="warning" %}
Timing is very important and need to respect this constraint:

* `Silence` should always be greater than `Lip Close Duration` and `In between`&#x20;
  {% endhint %}

#### Add Audio

<figure><img src="/files/TkfXm7xbxM4rvgZ2MHaX" alt=""><figcaption></figcaption></figure>

* Add a Video Sequencer Editor
* Drag & Drop (or Add) your media file

{% hint style="info" %}
You should only have one enabled media File. Otherwise speech recognition may product unexpected results.
{% endhint %}

#### Baking

Press `Bake Audio` and wait!

<figure><img src="/files/CZaRkxx53JFaFh2rMz04" alt=""><figcaption><p>Lip Sync inserted 1372 Keyframes in a few seconds!</p></figcaption></figure>

{% hint style="warning" %}
Baking will remove previously inserted keyframes on defined Shape Keys.
{% endhint %}

{% hint style="info" %}
For Shape Keys, Keyframes use a **Linear Interpolation**
{% endhint %}

{% hint style="success" %}
Lip Sync works with **all Frame Rates** (24 fps, 30 fps, 60 fps, etc..)
{% endhint %}

Now your character is talking! 🎬


---

# Agent Instructions: 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.cgpoly.io/lip-sync-documentation/quick-start-guides/quick-start-shape-keys.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.
