For my project on audio analysis, I have downloaded several .wav files while converted some of my .mp3 files to .wav files. But when these .wav files are read using wavfile.read() function. the dimension of the data returned is varies from file to file. Consider my code to read .wav file -
from pyAudioAnalysis import audioBasicIO
from pyAudioAnalysis import audioFeatureExtraction
import matplotlib.pyplot as plt
from scipy.io import wavfile
import MySQLdb
[Fs, x] = wavfile.read("B128.wav");
print "Sampling Frequency : "
print Fs
print "Data : "
print x
The output when B128.wav is read is -
Output when file song.wav is read -
the file B128.wav was downloaded from a website, while song.wav is made converting a .mp3 file to .wav using an online converter tool.
My question is that why the data part is having different dimensions for same file format and how to convert them into a (1xN) dimension