ComfyUI-Whisper icon indicating copy to clipboard operation
ComfyUI-Whisper copied to clipboard

Proposal: use whisper-ts instead of the original whisper

Open Quasimondo opened this issue 1 year ago • 1 comments

Given that whisper-ts has some very nice improvements regarding the precision of timestamp alignments you might want to consider to replace the current whisper with whisper-ts - I tested it and it only requires a few lines of code to change:

import stable_whisper as whisper

[...]
#old:
#result = model.transcribe(audio_save_path,word_timestamps=True)

#new:
result = model.transcribe_minimal(audio_save_path,word_timestamps=True)
result = model.align(audio_save_path, result, language=result.language).to_dict()

Quasimondo avatar May 19 '24 09:05 Quasimondo

Thanks. Make a PR and I'll merge it.

yuvraj108c avatar May 22 '24 13:05 yuvraj108c