sandrohanea / whisper.net

Whisper.net. Speech to text made simple using Whisper Models
MIT License
512 stars 78 forks source link

Single word timestamps #101

Closed RoryMcHughh closed 10 months ago

RoryMcHughh commented 11 months ago

Is there a way to get single word timestamps instead of sentences? I tried SplitOnWord() but it isnt working.

sandrohanea commented 10 months ago

Each Word of the english vocabulary is a token in the output of whisper. In order to get these timestamps for each token, you can use: https://github.com/sandrohanea/whisper.net/blob/b927e36b9c5b402325abd519f0c23e4e0505227d/Whisper.net/WhisperProcessorBuilder.cs#L177