-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[docs] add quick usage snippet to Whisper. #31289
[docs] add quick usage snippet to Whisper. #31289
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
docs/source/en/model_doc/whisper.md
Outdated
import torch | ||
from transformers import pipeline | ||
|
||
whisper = pipeline("automatic-speech-recognition", "openai/whisper-large-v3", torch_dtype=torch.float16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also load to GPU?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you could even put the code examples right above # Overview
to help users get started even faster. They're probably not too interested in reading the abstract anyways.
You can probably even get away without adding any text to focus it even more on the code. The user would just see three tabs for selecting their GPU, copy/paste the corresponding code example, and start whispering.
For any other details (or if they're just curious), users could then choose to explore the rest of the doc.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Not stale |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Not stale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge it as is and eventually iterate on it later? Done is better than perfect
* [docs] add quick usage snippet to Whisper. * Apply suggestions from review. * 💉 Fix the device for pipeline.
What does this PR do?
The aim of this PR is to add a simple code snippet that anyone stumbling upon the Whisper documentation can look at and get to "Whispering" ASAP.
Internal slack thread for context
Once we agree on a structure I'd like to open a more bigger PR to add such for top visited text-generation models and image/ VLMs too.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community can review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@LysandreJik @stevhliu @osanseviero @pcuenca