Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from matplotlib import pyplot as plt
- import os
- for _,_,filenames in os.walk('./finalexp/finalexp_tarik_v2'):
- files = [f.replace(".wav", "").split("__") for f in filenames if f.endswith('.wav') and f != 'stitched.wav']
- files = sorted(files, key = lambda x: int(x[0]))
- x,y = zip(*files)
- x = [int(i) for i in x]
- y = [float(i) for i in y]
- # plt.plot(x,y)
- for _,_,filenames in os.walk('./finalexp/finalexp_tarik_v3'):
- files = [f.replace(".wav", "").split("__") for f in filenames if f.endswith('.wav') and f != 'stitched.wav']
- files = sorted(files, key = lambda x: int(x[0]))
- x2,y2 = zip(*files)
- x2 = [int(i) + 9 for i in x2]
- y2 = [float(i) for i in y2]
- plt.figure(figsize=(10,6))
- plt.plot(x,y)
- plt.plot(x2,y2)
- plt.tight_layout()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement