Genre Recognition

Load Audio

Load 30 seconds of an audio file:

In [3]:
filename_brahms = 'audio/brahms_hungarian_dance_5.mp3'
x_brahms, sr_brahms = librosa.load(filename_brahms, duration=30)

Load 30 seconds of another audio file:

In [4]:
filename_busta = 'audio/busta_rhymes_hits_for_days.mp3'
x_busta, sr_busta = librosa.load(filename_busta, duration=30)

Play the audio files:

In [5]:
ipd.Audio(x_brahms, rate=sr_brahms)
Out[5]: