]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
whisper : map token timestamps to original time when VAD is enabled (#3910)
authorLin Xiaodong <redacted>
Wed, 1 Jul 2026 06:23:50 +0000 (14:23 +0800)
committerGitHub <redacted>
Wed, 1 Jul 2026 06:23:50 +0000 (08:23 +0200)
commit5cad7abb1e229a27c00730c1882305d282ee6941
treebc27554bf06a8b46b8bfdb99c69cc8357b87b42f
parent909307c8bd2edc8ff9ed631e2e11789d93123813
whisper : map token timestamps to original time when VAD is enabled (#3910)

whisper_full_get_token_data().t0/t1 are in the VAD-processed timeline (silences
removed), so they don't line up with the original audio. Add
whisper_full_get_token_t0/t1 that map them back.

A token inside a speech segment is interpolated within it; a token that falls in a
removed inter-segment silence snaps to the nearest boundary, so it never lands in
the middle of a cut-out gap. Without VAD the raw times are returned unchanged.
include/whisper.h
src/whisper.cpp
tests/test-vad-full.cpp