Audio tasks
Adapted for this playbook from the 🤗 Transformers documentation by Hugging Face. Official page: https://huggingface.co/docs/transformers/tasks/asr. Images © Hugging Face (
documentation-images) unless noted. This is not a substitute for the upstream docs — verify against the current version.Covers Hugging Face pages: tasks/asr, audio_classification, audio_text_to_text, text-to-speech
| Task | Official guide |
|---|---|
| Automatic speech recognition | ASR |
| Audio classification | audio_classification |
| Audio-text-to-text | audio_text_to_text |
| Text to speech | text-to-speech |
Practical notes​
- Resample to the model’s expected rate (often 16 kHz for ASR)
- Prefer Pipeline for batch transcription prototypes
- See flagship Whisper
from transformers import pipeline
asr = pipeline("automatic-speech-recognition", model="openai/whisper-small")
print(asr("https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac"))
Discussion
Comments​
Share feedback or questions about this page. No account required.
Loading comments…