Commit 8e3c93a
linxiaodong
whisper : add VAD-mapped token timestamp getters
whisper_full_get_token_data().t0/t1 are in VAD "processed" time when VAD
is enabled (silence removed), so only segment timestamps were mapped back
to the original timeline; callers had no way to get token/word-level times
on the original timeline.
Add whisper_full_get_token_t0/t1 (+ _from_state) which apply the same
vad_mapping_table that the segment getters use. With VAD off, or when no
mapping table exists, they return the raw token times, so existing
behavior is unchanged.1 parent c8ae48a commit 8e3c93a
2 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
670 | 679 | | |
671 | 680 | | |
672 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8075 | 8075 | | |
8076 | 8076 | | |
8077 | 8077 | | |
| 8078 | + | |
| 8079 | + | |
| 8080 | + | |
| 8081 | + | |
| 8082 | + | |
| 8083 | + | |
| 8084 | + | |
| 8085 | + | |
| 8086 | + | |
| 8087 | + | |
| 8088 | + | |
| 8089 | + | |
| 8090 | + | |
| 8091 | + | |
| 8092 | + | |
| 8093 | + | |
| 8094 | + | |
| 8095 | + | |
| 8096 | + | |
| 8097 | + | |
| 8098 | + | |
| 8099 | + | |
| 8100 | + | |
| 8101 | + | |
| 8102 | + | |
| 8103 | + | |
| 8104 | + | |
| 8105 | + | |
| 8106 | + | |
8078 | 8107 | | |
8079 | 8108 | | |
8080 | 8109 | | |
| |||
0 commit comments