Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- duration_of_recordings=[]
- for label in labels:
- waves = [f for f in os.listdir(train_audio_path + '/'+ label) if f.endswith('.wav')]
- for wav in waves:
- sample_rate, samples = wavfile.read(train_audio_path + '/' + label + '/' + wav)
- duration_of_recordings.append(float(len(samples)/sample_rate))
- plt.hist(np.array(duration_of_recordings))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement