SYSTRAN / faster-whisper

Faster Whisper transcription with CTranslate2
MIT License
12.66k stars 1.06k forks source link

Added encoder output #1136

Closed SinanAkkoyun closed 6 days ago

SinanAkkoyun commented 1 week ago

WhisperModel now also outputs encoder embeddings optionally.

Usage: normal, backwards compatible:

segments, info = model.transcribe(audio_path, beam_size=1)

for encoder outputs:

segments, info, encoder_output = model.transcribe(audio_path, beam_size=1).all()

Usage is fully backwards compatible

MahmoudAshraf97 commented 1 week ago

Hello and thanks for your contribution, however, I don't see why would the encoder output be needed after the transcription, so far I'm not in favor of merging this PR as it's a very niche use case