From de362180f0299e173303c80b83b976f51a569c86 Mon Sep 17 00:00:00 2001 From: lipku Date: Sat, 28 Jun 2025 22:11:56 +0800 Subject: [PATCH] fix custom video --- README.md | 6 ++++-- basereal.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de14ebe..5230d94 100644 --- a/README.md +++ b/README.md @@ -107,10 +107,12 @@ wav2lip256显卡3060以上即可,musetalk需要3080Ti以上。 2. 完全语音交互,数字人回答过程中支持通过唤醒词或者按钮打断提问 3. 实时同步字幕,给前端提供数字人每句话播报开始、结束事件 4. 每个连接可以指定对应avatar和音色,avatar图片加载加速 -5. 动作编排:不说话时动作、唤醒时动作、思考时动作、进入休眠动作 +5. 动作编排:不说话时动作、唤醒时动作、思考时动作 6. 支持不限时长的数字人形象avatar 7. 提供实时音频流输入接口 -8. 数字人透明背景,能叠加动态背景 +8. 数字人透明背景,叠加动态背景 + +更多详情 ## 7. 声明 基于本项目开发并发布在B站、视频号、抖音等网站上的视频需带上LiveTalking水印和标识,如需去除请联系作者备案授权。 diff --git a/basereal.py b/basereal.py index 017f5e7..aacfa42 100644 --- a/basereal.py +++ b/basereal.py @@ -284,6 +284,8 @@ class BaseReal: def set_custom_state(self,audiotype, reinit=True): print('set_custom_state:',audiotype) + if self.custom_audio_index.get(audiotype) is None: + return self.curr_state = audiotype if reinit: self.custom_audio_index[audiotype] = 0