WhisperProcessor class import doesn't work

#1
by mrJezy - opened

Pulled the latest version of transformers, but the class import won't work as seen in the example:

from transformers import WhisperProcessor, WhisperForConditionalGeneration

ImportError: cannot import name 'WhisperProcessor' from 'transformers'

This is normal as the model has not yet been merged, please wait a little bit!

All right! Thanks for the quick feedback! :)

@ArthurZ
How long it takes to get the model merged?

I'm also having the same error.

I think its merged

I tried it, but when I run the result part, it gives
the following error:

TypeError: list indices must be integers or slices, not str
Any solution?

Screen Shot 2022-10-06 at 11.35.11 AM.png

I not tested this code, but maybe try something like this on error line:

input_features = processor(batch[0]["audio"]["array"], return_tensors="pt").input_features

I think problem in batch. You can check also like this:

print(list(batch[0].keys()))

If "audio" in keys - then I hope solution upper in my msg will work.

Sign up or log in to comment