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

Add Whisper speech recognition example #397

Merged
merged 1 commit into from
Oct 27, 2024
Merged

Conversation

robertknight
Copy link
Owner

@robertknight robertknight commented Oct 27, 2024

Add a speech recognition example using Whisper.

This uses Hugging Face's implementation for consistency with other examples. The upside is that HF maintain these models and their docs. The downside is that the Python model code is much more complicated to dig into than OpenAI's original implementation or other ONNX-exportable implementations.

  • Add Whisper example that has been tested with the Tiny, Base, Small and Medium V3 models. The Large Turbo model doesn't work, for reasons yet to be determined.
  • Add script to export mel weight matrices from librosa. This is the same procedure that was used to generate the mel weight matrices in OpenAI's original Whisper implementation.
  • Add microfft dependency for FFT of f32 signals. This is a small and portable FFT implementation.

Performance is OK, but there is an expensive Transpose operation showing up in profiles, especially for the larger models, which needs looking into.

 - Add Whisper example that has been tested with the Tiny, Base, Small
   and Medium V3 models. The Large Turbo model doesn't work, for reasons
   yet to be determined.
 - Add script to export mel weight matrices from librosa. This is the
   same procedure that was used to generate the mel weight matrices in
   OpenAI's original Whisper implementation.
 - Add microfft dependency for FFT of f32 signals. This is a small and
   portable FFT implementation.
@robertknight robertknight merged commit ac4808f into main Oct 27, 2024
2 checks passed
@robertknight robertknight deleted the whisper-example branch October 27, 2024 12:52
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

Successfully merging this pull request may close these issues.

1 participant