I wanted to design a neural network, which after training would take .mp3 files as input, and then based on training, it would decide if the music is good or bad on a scale of 1-10. But for this, I would need to convert the audio file into arrays of wavelength, frequencies, amplitude and all other parameters required to define music, and then use these arrays as input to the neural network. How should I approach this problem?
if you convert your .mp3 files to .wav you can do:
from scipy.io import wavfile as wav
from scipy.fftpack import fft
import numpy as np
rate, data = wav.read('music.wav')
fft_out = fft(data)
From http://www.dummies.com/programming/python/performing-a-fast-fourier-transform-fft-on-a-sound-file/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With