Loading Data
Initial Questions
What is the distribution of all the categories in this data?
The .wave files are different lengths, so we can't just get the mean of number of wav files per label.
Solution: Create a
matplotlib.pyplot
with length!
Analyze distribution of categories in data using Pyplot
Prerequisite Knowledge:
wavefile.read("file.wav")
→(sample rate (int), data (numpy array)
Used this instead of
librose.load()
in this case because:Faster in most cases
By default, wavefile does not normalize the data (get an accurate sample rate with no manipulation to the data)
data.shape = (num_samples, num_channels)
Therefore,
length = data.shape[0] / sample_rate
np.array.shape
→(width, height)
Last updated