MahmoudAshraf97 / whisper-diarization

Automatic Speech Recognition with Speaker Diarization based on OpenAI Whisper
BSD 2-Clause "Simplified" License
3.28k stars 272 forks source link

Update helpers.py #57

Closed catyung closed 1 year ago

catyung commented 1 year ago

Hi ! :)

I am using diarize_parallel.py function, while having error :

Traceback (most recent call last):
  File "/content/diarize_parallel.py", line 120, in <module>
    wsm = get_words_speaker_mapping(word_timestamps, speaker_ts, "start")
  File "/content/helpers.py", line 120, in get_words_speaker_mapping
    wrd_dict["text"],
KeyError: 'text'

I think in there is no Key called "text", instead it should be "word".

wrd_dict["word"]

Please advise if I am wrong. Thank you ! :)

MahmoudAshraf97 commented 1 year ago

Hello, does the same error occur with the normal diarization not the parallel?