Cloud Technology Community Question

Step-by-step on how to use pre-trained AI models with Hugging Face for audio to text?

Posted on 2025-01-20 • In Cloud Technology • By Larry Roberts

I'm a bit confused about the pipeline for speech-to-text. Can someone explain how to use pre-trained AI models with Hugging Face to transcribe audio files? Specifically, I'm looking at OpenAI's Whisper model on the Hugging Face hub. Do I need to preprocess the audio into a certain format, or does the library handle that? I'm trying to build an automated meeting note-taker.

3 Answers 11,085 Views

All answers to this question 3 Answers

Helen Phillips Answered on 2025-03-14
Answered

Whisper is arguably the best open-source model for this right now. The transformers library makes it very simple. You should use the WhisperProcessor to handle the feature extraction (like converting audio to log-mel spectrograms) and WhisperForConditionalGeneration for the actual transcription. One thing to note: Whisper expects audio sampled at 16kHz. If your meeting recordings are in 44.1kHz, you must resample them first using the librosa or torchaudio library, otherwise, the transcription quality will be terrible.

Ryan Mitchell Answered on 2025-04-22
Answered

Are you planning to run this locally or on a cloud provider like AWS? The "large-v3" model is very accurate but requires a decent GPU with at least 10GB of VRAM to run smoothly.

Larry Roberts Commented on 2025-04-25
Commented

Ryan, I'm planning to deploy this on an AWS EC2 g4dn instance. It has a T4 GPU, so I think it should handle the medium or large model. My main concern is the cost—do you think the "small" model is enough for clear English recordings to save on compute?

Steven Evans Answered on 2025-05-15
Answered

For English-only meetings, the distil-whisper models are amazing. They are much faster and almost as accurate as the original large models.

Helen Phillips Commented on 2025-05-22
Commented

Steven is right. Distil-whisper is a game changer for cost-saving on AWS. It cuts down inference time by almost 50% without a noticeable drop in transcription quality for clear speech.

Write a Comment

Your email address will not be published. Required fields are marked (*)

Join the LearnersEra Community

Ask questions, share knowledge and learn from professionals across technology, project management and certification topics.

Change Country and Nearest City

Select your country and nearest city to see courses available in your region.