Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get an "incorrect audio shape" assert when I process the whisper models #1

Closed
jasontitus opened this issue Apr 8, 2023 · 1 comment

Comments

@jasontitus
Copy link

When trying to convert the whisper models I get an assert -

assert x.shape[1:] == self.positional_embedding.shape, "incorrect audio shape"

It doesn't seem to kill the process, but the produced models don't seem to recognize much of anything (one word of the JFK sample, for example), and are different from the models others uploaded to HF. I'm running this on a Macbook Pro M2 64GB - Mac OS 13.3.

@wangchou
Copy link
Owner

wangchou commented Apr 14, 2023

That means ... there is a warning on that assert line.
That assert didn't get fired.

About how to use the encoder model, please check ggerganov/whisper.cpp#566 .

/projects/w/whisper/whisper/model.py:166: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data
flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert x.shape[1:] == self.positional_embedding.shape, "incorrect audio shape"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants