I have created some hacky code to do so and have posted it in this huggingface github issue 14. You can find it here: Getting time offsets of beginning and end of each word in Wav2Vec2 · Issue #11307 · huggingface/transformers · GitHub 56