Whisper and pyannote 3.1 : AttributeError: 'list' object has no attribute 'get'

147 views Asked by At

I'm using this script to diarize then transcribe speach using pyannote.audio and whisper. Using pyannote 2.1, it works perfectly, but then, when I change the version used to the latest (3.1), I get an error when running this line :

for segment, _, speaker in who_speaks_when1.itertracks(yield_label=True):
    waveform, sample_rate = audio.crop(audio_file1, segment)
    text = model.transcribe(waveform.squeeze().numpy())["text"]
    print(f"{segment.start:06.1f}s {segment.end:06.1f}s {speaker}: {text}")

When I should have the transcript of the audio I'm using, I get the error message AttributeError: 'list' object has no attribute 'get'.

pyannote 2.1 works fine, so so far I'm happy to use it, but I'm very frustrated not to be able to see what the latest versions do.

Any idea ?

0

There are 0 answers