Introduce lip syncer weight

This commit is contained in:
henryruhs
2025-06-09 15:46:58 +02:00
parent 918dd2c0d6
commit 9fc32f2d94
2 changed files with 2 additions and 1 deletions

View File

@@ -92,6 +92,7 @@ frame_colorizer_blend =
frame_enhancer_model =
frame_enhancer_blend =
lip_syncer_model =
lip_syncer_weight =
[uis]
open_browser =

View File

@@ -189,7 +189,7 @@ def prepare_audio_frame(temp_audio_frame : AudioFrame) -> AudioFrame:
temp_audio_frame = numpy.maximum(numpy.exp(-5 * numpy.log(10)), temp_audio_frame)
temp_audio_frame = numpy.log10(temp_audio_frame) * 1.6 + 3.2
temp_audio_frame = temp_audio_frame.clip(-4, 4).astype(numpy.float32)
temp_audio_frame = temp_audio_frame * (state_manager.get_item('lip_syncer_weight') * 2.0)
temp_audio_frame = temp_audio_frame * state_manager.get_item('lip_syncer_weight') * 2.0
temp_audio_frame = numpy.expand_dims(temp_audio_frame, axis = (0, 1))
return temp_audio_frame