File size: 7,374 Bytes
229897d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# Gemini Live Avatar - FAQ

## Quick Start Guide

### Prerequisites
- **GPU**: NVIDIA GPU with 11GB+ VRAM (recommended)
- **Python**: 3.10
- **CUDA**: 11.8
- **OS**: Windows/Linux

### Installation

1. **Clone Repository**
```bash

git clone https://github.com/Kedreamix/Linly-Talker.git

cd Linly-Talker

```

2. **Create Environment**
```bash

conda create -n linly python=3.10

conda activate linly

```

3. **Install PyTorch**
```bash

# CUDA 11.8

pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118

```

4. **Install Dependencies**
```bash

conda install -q ffmpeg

pip install -r requirements_webui.txt



# MuseTalk dependencies

pip install --no-cache-dir -U openmim

mim install mmengine 

mim install "mmcv>=2.0.1" 

mim install "mmdet>=3.1.0" 

mim install "mmpose>=1.1.0"

```

5. **Download Models**

Download the required models from one of these sources:
- [Baidu Netdisk](https://pan.baidu.com/s/1eF13O-8wyw4B3MtesctQyg?pwd=linl) (Password: linl)
- [HuggingFace](https://huggingface.co/Kedreamix/Linly-Talker)
- [ModelScope](https://modelscope.cn/models/Kedreamix/Linly-Talker)

**Required Models:**
- MuseTalk models β†’ `Musetalk/models/`
- SadTalker checkpoints β†’ `checkpoints/`
- Face detection models β†’ `gfpgan/weights/`

6. **Launch**
```bash

python webui.py

```

Open `http://localhost:7860` in your browser.

---

## Common Issues

### 1. Installation Issues

#### Q: `Microsoft Visual C++ 14.0 is required`
**A:** Install [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)

#### Q: `version GLIBCXX_3.4.* not found`

**A:** Use Python 3.10 or downgrade libraries:

```bash

pip install pyopenjtalk==0.3.1

pip install opencc==1.1.1

```



#### Q: FFMPEG not found

**A:** Install via conda:

```bash

conda install -q ffmpeg

```



Or on Linux:

```bash

sudo apt install ffmpeg

```



---



### 2. Model & Weight Issues



#### Q: `FileNotFoundError` for model weights

**A:** Ensure models are in correct folders:

```

Linly-Talker/

β”œβ”€β”€ checkpoints/

β”‚   β”œβ”€β”€ mapping_00109-model.pth.tar (149MB)
β”‚   β”œβ”€β”€ mapping_00229-model.pth.tar (149MB)

β”‚   └── ...

β”œβ”€β”€ Musetalk/

β”‚   └── models/

β”‚       β”œβ”€β”€ musetalk/

β”‚       β”œβ”€β”€ dwpose/

β”‚       └── ...

└── gfpgan/

    └── weights/

```



#### Q: `SadTalker Error: invalid load key, 'v'`

**A:** Re-download `mapping_*.pth.tar` files (they should be 149MB each):

```bash

wget -c https://modelscope.cn/api/v1/models/Kedreamix/Linly-Talker/repo?Revision=master&FilePath=checkpoints%2Fmapping_00109-model.pth.tar

wget -c https://modelscope.cn/api/v1/models/Kedreamix/Linly-Talker/repo?Revision=master&FilePath=checkpoints%2Fmapping_00229-model.pth.tar

```



#### Q: `File is not a zip file` (NLTK error)

**A:** Manually download `nltk_data`:

```python

import nltk

print(nltk.data.path)  # Find cache path

```

Download from [Quark Netdisk](https://pan.quark.cn/s/f48f5e35796b) and place in cache path.



---



### 3. Runtime Issues



#### Q: VRAM overflow / Out of Memory

**A:** 

- **Minimum**: 6GB VRAM (SadTalker only)

- **Recommended**: 11GB+ VRAM (MuseTalk)

- **Solution**: Use lower resolution images or reduce batch size



#### Q: `GFPGANer is not defined`

**A:** Install enhancement module:

```bash

pip install gfpgan

```



#### Q: `Gradio Connection errored out`

**A:** 

- Check firewall settings

- Try different port in `webui.py`:

```python

demo.launch(server_port=7861)  # Change port

```



#### Q: Avatar preparation fails

**A:**

- Use clear frontal face images/videos

- Recommended resolution: 512x512 to 1024x1024

- Supported formats: `.jpg`, `.png`, `.mp4`



---



### 4. Gemini Live Specific Issues



#### Q: WebSocket connection fails

**A:** 

- Verify Railway bridge is running: `wss://gemini-live-bridge-production.up.railway.app/ws`

- Check internet connection

- Ensure no firewall blocking WebSocket connections



#### Q: No audio playback

**A:** 

- Check browser audio permissions

- Verify `speaker_output` component has `autoplay=True`

- Test with different browser (Chrome recommended)



#### Q: Avatar not lip-syncing

**A:**

1. Click "🎭 Prepare Avatar" and wait for "βœ… Ready"

2. Click "πŸ”Œ Connect to Gemini" and wait for "βœ… Connected"

3. Ensure microphone permissions are granted

4. Check audio buffer is receiving data



#### Q: High latency / Lag

**A:**

- **Target**: <1 second end-to-end

- **Optimize**:

  - Use GPU (not CPU)

  - Reduce image resolution

  - Set `return_frame_only=True` in `inference_streaming()` for faster rendering

  - Check network speed to Railway bridge



---



### 5. Usage Tips



#### Q: How to use custom avatar?

**A:**

1. Uncheck "Use Default Avatar"

2. Upload your image/video (frontal face, clear features)

3. Adjust "Mouth Position Fix" slider if needed

4. Click "🎭 Prepare Avatar"



#### Q: How to adjust mouth position?

**A:** Use the "BBox Shift" slider:

- **Positive values** (+): Move mouth down

- **Negative values** (-): Move mouth up

- Default: 5



#### Q: Best practices for demo?

**A:**

1. **Preparation**: Always prepare avatar before connecting

2. **Connection**: Wait for "βœ… Connected" status

3. **Speaking**: Speak clearly, natural pace

4. **Interruption**: Gemini 2.5 Flash handles interruptions natively - try it!

5. **Quality**: Use good microphone for best results



---



## Performance Benchmarks



| Component | Latency | VRAM Usage |

|-----------|---------|------------|

| WebSocket (Railway) | ~50ms | 0GB |

| Gemini 2.5 Flash | ~200ms | 0GB (Cloud) |

| MuseTalk Inference | ~40ms/frame | 6-8GB |

| Audio Buffer | ~200ms | <1GB |

| **Total End-to-End** | **~500ms** | **8-11GB** |



---



## System Requirements



### Minimum

- GPU: 6GB VRAM

- RAM: 8GB

- CPU: 4 cores

- Network: 10 Mbps



### Recommended

- GPU: 11GB+ VRAM (RTX 2080 Ti / RTX 3060 or better)

- RAM: 16GB

- CPU: 8 cores

- Network: 50 Mbps



---



## Troubleshooting Checklist



Before reporting issues, verify:



- [ ] Python 3.10 installed

- [ ] CUDA 11.8 installed (for GPU)

- [ ] All model weights downloaded (check file sizes)

- [ ] Models in correct folder structure

- [ ] Dependencies installed (`requirements_webui.txt`)

- [ ] FFMPEG installed

- [ ] Sufficient VRAM available

- [ ] Railway bridge is accessible

- [ ] Firewall allows WebSocket connections

- [ ] Browser has microphone permissions



---



## Getting Help



1. **Check this FAQ first**

2. **Review error messages** - most include hints

3. **Check model file sizes** - incomplete downloads are common

4. **Try with default avatar** - isolates custom image issues

5. **Report issues** with:

   - Full error message

   - Python version

   - GPU model

   - Steps to reproduce



---



## Links



- **GitHub**: [Kedreamix/Linly-Talker](https://github.com/Kedreamix/Linly-Talker)

- **Models**: [HuggingFace](https://huggingface.co/Kedreamix/Linly-Talker) | [ModelScope](https://modelscope.cn/models/Kedreamix/Linly-Talker)

- **Railway Bridge**: [gemini-live-bridge](https://gemini-live-bridge-production.up.railway.app)



---



**Last Updated**: February 2026  

**Version**: Gemini Live Integration v1.0