Uploaded June 2021 | Updated September 2026, 2 weeks ago
Learn how to extract Mel Spectrograms and resampling audio with torchaudio. I also review the most common torchaudio transforms and explain how you can use them.
Code:
github.com/musikalkemist/pytorchforaudio/tree/main/05%20Extracting%20Mel%20spectrograms
===============================
Interested in hiring me as a consultant/freelancer?
valeriovelardo.com
Join The Sound Of AI Slack community:
valeriovelardo.com/the-sound-of-ai-community
Connect with Valerio on Linkedin:
linkedin.com/in/valeriovelardo
Follow Valerio on Facebook:
facebook.com/TheSoundOfAI
Follow Valerio on Twitter:
twitter.com/musikalkemist
===============================
Content
0:00 Intro
0:46 Torchaudio transformations
2:56 Instantiating MelSpectrogram
4:36 Extracting Mel spectrograms in UrbanSoundDataset
9:51 Resample and mix down in getitem
12:45 Resampling signal
15:52 Mixing down signal to mono
20:04 Getitem recap
21:08 Running the script to extract mel spectrogram
21:49 Outro
Learn how to extract Mel Spectrograms and resampling audio with torchaudio. I also review the most common torchaudio transforms and explain how you can use them.
Code:
github.com/musikalkemist/pytorchforaudio/tree/main/05%20Extracting%20Mel%20spectrograms
===============================
Interested in hiring me as a consultant/freelancer?
valeriovelardo.com
Join The Sound Of AI Slack community:
valeriovelardo.com/the-sound-of-ai-community
Connect with Valerio on Linkedin:
linkedin.com/in/valeriovelardo
Follow Valerio on Facebook:
facebook.com/TheSoundOfAI
Follow Valerio on Twitter:
twitter.com/musikalkemist
===============================
Content
0:00 Intro
0:46 Torchaudio transformations
2:56 Instantiating MelSpectrogram
4:36 Extracting Mel spectrograms in UrbanSoundDataset
9:51 Resample and mix down in getitem
12:45 Resampling signal
15:52 Mixing down signal to mono
20:04 Getitem recap
21:08 Running the script to extract mel spectrogram
21:49 Outro










