From 155f31121f0d6abb9adf6ee34710fc2bc3a68f5a Mon Sep 17 00:00:00 2001 From: sion123 <450702724@qq.com> Date: Thu, 9 Apr 2026 00:32:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(kling):=20=E4=BC=98=E5=8C=96=E6=97=B6?= =?UTF-8?q?=E9=95=BF=E5=8C=B9=E9=85=8D=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=9B=BA=E5=AE=9A=E9=98=88=E5=80=BC=E6=9B=BF=E4=BB=A3?= =?UTF-8?q?=E6=AF=94=E4=BE=8B=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web-gold/src/views/kling/components/TimelinePanel.vue | 5 ++++- .../web-gold/src/views/kling/stores/useDigitalHumanStore.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/app/web-gold/src/views/kling/components/TimelinePanel.vue b/frontend/app/web-gold/src/views/kling/components/TimelinePanel.vue index d1bbdef79c..f8d5afacec 100644 --- a/frontend/app/web-gold/src/views/kling/components/TimelinePanel.vue +++ b/frontend/app/web-gold/src/views/kling/components/TimelinePanel.vue @@ -135,10 +135,13 @@ const isExceed = computed(() => props.audioDurationMs > props.faceDurationMs) const diffMs = computed(() => Math.abs(props.audioDurationMs - props.faceDurationMs)) +/** 时长差异阈值:3秒内视为匹配 */ +const MATCH_THRESHOLD_MS = 3000 + const diffStatus = computed(() => { if (props.audioDurationMs === 0) return 'none' if (props.audioDurationMs > props.faceDurationMs) return 'exceed' - if (props.audioDurationMs < props.faceDurationMs * 0.5) return 'short' + if (props.faceDurationMs - props.audioDurationMs > MATCH_THRESHOLD_MS) return 'short' return 'match' }) diff --git a/frontend/app/web-gold/src/views/kling/stores/useDigitalHumanStore.ts b/frontend/app/web-gold/src/views/kling/stores/useDigitalHumanStore.ts index ad06fe3114..a16035dad7 100644 --- a/frontend/app/web-gold/src/views/kling/stores/useDigitalHumanStore.ts +++ b/frontend/app/web-gold/src/views/kling/stores/useDigitalHumanStore.ts @@ -156,7 +156,7 @@ export const useDigitalHumanStore = defineStore('digitalHuman', () => { if (!timeline.value || timeline.value.audioDurationMs === 0) return 'none' const { videoDurationMs, audioDurationMs } = timeline.value if (audioDurationMs > videoDurationMs) return 'exceed' - if (audioDurationMs < videoDurationMs * 0.3) return 'too-short' + if (videoDurationMs - audioDurationMs > 3000) return 'too-short' return 'match' })