Skip to content

Fix/audio srt timeline 216 - #220

Open
Minh3132 wants to merge 4 commits into
modelscope:mainfrom
Minh3132:fix/audio-srt-timeline-216
Open

Minh3132 wants to merge 4 commits into
modelscope:mainfrom
Minh3132:fix/audio-srt-timeline-216

Conversation

@Minh3132

Copy link
Copy Markdown

Summary

  • TODO

User impact

Who benefits from this change, and what FunClip workflow improves?

Validation

  • I ran the relevant tests or commands:
  • I checked the affected README/docs links, if changed.
  • I verified the affected UI, API, ASR, LLM, or clipping path, if changed.

Screenshots or clips

Add before/after screenshots, subtitles, timestamps, or short clips for UI or clipping-result changes.

Notes for reviewers

Mention any follow-up work, known limitations, or files that deserve extra attention.

@LauraGPT LauraGPT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on #216. I checked head 91977f6: both submitted tests pass, but an empty first slice still shifts the following subtitle earlier while leaving the audio correct. This overlaps with the existing #217; its current b00e900b passes the same case. Please coordinate around that implementation instead of reintroducing the earlier accumulation bug, and fill in the PR summary/validation rather than leaving the template.

Bounded validation used the exact candidate VideoClipper module and hash-verified base helpers with real NumPy/subtitle code, synthetic audio and no ASR/model inference. This is not full-suite, browser/video or accuracy validation.

Comment thread funclip/videoclipper.py
time_acc_ost=time_acc_ost,
)
clip_srt += srt_clip
time_acc_ost += (end - start) / 16000.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Accumulate actual appended samples, not the signed interval length. With 8 s of 16 kHz audio, timestamp_list=[[16000,32000],[64000,112000]], start_ost=1500, end_ost=0, and sentence timestamps [[1000,2000],[6000,7000]] ms, the first clamped slice is 2.5–2.0 s and therefore empty. This line adds -0.5 s anyway. The second slice contributes 24000 correct samples, but its world subtitle becomes 0.000–1.000 s instead of 0.500–1.500 s. I reproduced the correct timing on base and current #217, and the early timing on this head. Use an integer count of samples actually appended, deriving seconds only when calling the subtitle helper, in both accumulation sites; add empty-first/middle and offset/clamping regression cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants