SYSTRAN / faster-whisper

Faster Whisper transcription with CTranslate2
MIT License
11.61k stars 962 forks source link

Remove the usage of `transformers.pipeline` from `BatchedInferencePipeline` and fix word timestamps for batched inference #921

Closed MahmoudAshraf97 closed 2 months ago

MahmoudAshraf97 commented 2 months ago

This PR removes Remove the usage of transformers.pipeline from BatchedInferencePipeline because there's no need to use it in the first place this simplifies the code and removes a requirement it also fixes #919 it was caused by wrong num_frames argument when finding the alignments, it was assumed that inferring it from encoder output size was sufficient but turned out to cause issues such as #919 when the actual segment size is much less that the inferred size

MahmoudAshraf97 commented 2 months ago

@trungkienbkhn can I get a final review and merge if no changes needed?

trungkienbkhn commented 2 months ago

@MahmoudAshraf97 , LGTM. Tks for your contribution.