EtienneAb3d / WhisperHallu

Experimental code: sound file preprocessing to optimize Whisper transcriptions without hallucinated texts
275 stars 22 forks source link

Cannot obtain timestamps along with transcription #29

Open saksham324 opened 8 months ago

saksham324 commented 8 months ago

@EtienneAb3d Is there a way to get the timestamps of each sentence/word once the transcription is done? I only get the result transcription text

EtienneAb3d commented 8 months ago

@saksham324 You need to set the parameter method addSRT=True. Timestamps will start on the second line of the result, the first one being the full-text transcription. You may also add word_timestamps=True in the opts parameter set.