Building Machine Learning Systems with Python - Third Edition
by Luis Pedro Coelho, Willi Richert, Matthieu Brucher
Converting into WAV format
Sure enough, if we want to test our classifier on our private MP3 collection, we would not be able to extract much meaning. This is because MP3 is a lossy music compression format that cuts out parts that the human ear cannot perceive. This is nice for storing because, with MP3, you can fit 10 times as many songs on your device. For our endeavor, however, it is not so nice. For classification, we will have an easier time with WAV files because they can be directly read by the scipy.io.wavfile package. We would, therefore, have to convert our MP3 files, if we want to use them with our classifier.
If don't have a conversion tool nearby, you might want to check out SoX: http://sox.sourceforge.net. It claims to be the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access