-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
word-level timestamps? #27
Comments
Hi @antiboredom, To achieve word-level timestamps, you will need to enable from pywhispercpp.model import Model
model = Model('base.en', n_threads=6)
words = model.transcribe('file.mp3', token_timestamps=True, max_len=1)
for word in words:
print(word.text) |
Thank you! not sure why I was having trouble sorting that out myself!! One more thing, and I'm not sure if this is just a whisper thing or related to your project, but I'm seeing one longer word being broken up. In my test case, "Enormous" is becoming "En", "orm", "ous". Any ideas why that might be happening? |
it's a bit tricky to figure it out, as it is not an exact word-level timestamp per say, in fact you can set the And I think this is the problem with your test case, it seems like "Enormous" is tokenized into 3 tokens, and you get every token by its own. Although, I've never get such a case! Can you try for example to change the max_len to 8 for example ? |
Interesting! When I try |
You still get two separate words from "Enormous" even after Yes |
@antiboredom @abdeladim-s I think you might want to try out the shortened output from |
Hi - thanks for making this. I was trying to get word-level timestamps, but haven't been able to figure out how to. Any tips? Thanks again!
The text was updated successfully, but these errors were encountered: