Skip to content

Make words last untill new once are said? #359

Answered by jianfch
juliuswms asked this question in Q&A
Discussion options

You must be logged in to vote

suppress_ts_tokens has no direct effect on the word timestamps.
To make words last until new ones, just set the end of the each word to the start of the next word.
With something like this:

all_words = result.all_words()
for i, word in enumerate(all_words[:-1], 1):
    word.end = all_words[i].start
    

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by juliuswms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants