Pre-processing Audio with Different Durations @ValerioVelardoTheSoundofAI
Pre-processing Audio with Different Durations  @ValerioVelardoTheSoundofAI
Uploaded June 2021 | Updated September 2026, 2 weeks ago
Learn how to preprocess audio data with different lenghts, cutting and zero padding waveforms using Pytorch and torchaudio.

Code:
github.com/musikalkemist/pytorchforaudio/blob/main/06%20Padding%20audio%20files/urbansounddataset.py

===============================

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
1:12 Setting NUM_SAMPLES
1:48 Passing NUM_SAMPLES to UrbanSoundDataset
2:36 Updating __getitem__
5:14 Cutting waveform
9:27 Right padding waveform
17:25 Run script to check padding
18:53 Run script to check cutting
19:59 What's up next
20:56 Outro
Pre-processing Audio with Different DurationsJoin the hackathon!22.  Text-To-Music Generation with Mustango - Generative Music AIDemystifying the Fourier Transform: The IntuitionHow to Become an AI Music Expert13.  Cellular Automata - Generative Music AI CoursePreprocessing Song Dataset for Melody Generation, pt. 3Why My Audio AI Project Failed?Discrete Fourier Transform Explained EasilyHow to Select a Research Topic for Your PaperTypes of Audio Features for Machine LearningPredictions with a Sound Classifier Trained with PyTorch
Valerio Velardo - The Sound of AI |

Pre-processing Audio with Different Durations

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER