---
name: "Lip File Format"
type: topic
source: https://community.bistudio.com/wiki/Lip_File_Format
revid: 373456
updated: 2025-05-08T13:20:46Z
---

# Lip File Format

Lip is a humanly readable text file generated by [WaveToLip](../topics/WaveToLip.md) from any wss, wav, or ogg sound file and produces lip expressions (lip sync) for the speaking character.

> [!NOTE]
> - The source sound must be mono, 16 bit, to have any meaning in a lip file
> - The lip file must be named the same as the speech sound file for the engine to use it, e.g `PlayerTaunt.ogg`, `PlayerTaunt.lip`

### Syntax

The file begins with the frame step value `frame = <value>`, e.g `frame = 0.040` (this value is hardcoded in WaveToLip).

> [!NOTE]
> This line is inserted by WaveToLip and is not necessary for the file to work.

It is then followed with lines of `<timestamp>, <value>`:

- `<timestamp>` is a 3 digits precision float ranging between 0.000 (beginning of the file) and the audio file duration in seconds
- `<value>` is an integer ranging between 0 and 7 (included) which corresponds to an animation index in:

|  |  |
|---|---|
| `"CfgHeads" >> "Default_A3" >> "Grimaces" >> "Lipsync" >> "vizem"` | - `A3\Characters_F\Heads\Anim\male\Neutral.rtm`<br>- `A3\Characters_F\Heads\Anim\male\a.rtm`<br>- `A3\Characters_F\Heads\Anim\male\e2.rtm`<br>- `A3\Characters_F\Heads\Anim\male\f.rtm`<br>- `A3\Characters_F\Heads\Anim\male\m.rtm`<br>- `A3\Characters_F\Heads\Anim\male\y.rtm`<br>- `A3\Characters_F\Heads\Anim\male\v.rtm`<br>- `A3\Characters_F\Heads\Anim\male\i.rtm` |
| `"CfgHeads" >> "WomanHead_A3" >> "Grimaces" >> "Lipsync" >> "vizem"` | - `A3\Characters_F\Heads\Anim\female\Neutral.rtm`<br>- `A3\Characters_F\Heads\Anim\female\a.rtm`<br>- `A3\Characters_F\Heads\Anim\female\e2.rtm`<br>- `A3\Characters_F\Heads\Anim\female\f.rtm`<br>- `A3\Characters_F\Heads\Anim\female\m.rtm`<br>- `A3\Characters_F\Heads\Anim\female\y.rtm`<br>- `A3\Characters_F\Heads\Anim\female\v.rtm`<br>- `A3\Characters_F\Heads\Anim\female\i.rtm` |

The first timestamp-value line is always `0.000, 0`.\
The final line is `<fileDuration>, -1`, indicating the lip movement's end.

```cpp
frame = 0.040
0.000, 0
0.080, 2
// ...
11.080, -1
```

<sub>Source: [BI Community Wiki — Lip File Format](https://community.bistudio.com/wiki/Lip_File_Format) (revision 373456).</sub>
