Created
July 10, 2019 07:24
-
-
Save aravindpai/ea0e5614fe1b4e30b78f375846683e3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment