text_plain_output_1.png
import os

data_dir = '/kaggle/input/audio-mnist/data'
paths = []
labels = []
t = 0
for dirname, _, filenames in os.walk(data_dir):
    if t < 20:
        t += 1
        for filename in filenames:
            if filename[-4:] == '.wav':
                paths += [os.path.join(dirname, filename)]
                labels += [dirname.split('/')[-1]]
print(len(paths))