def do_file(p_path,path): print(">>> [%s/%s] :" % (p_path,path)) f = os.popen("ls %s/%s"%(p_path,path)) fs = f.read() f.close() f_list = fs.split('\n') print(">>> [%s]" % f_list) for _f in f_list[:-1]: if _f.find('.wav')>0: print('>>> wav file: [%s]' % _f) fn = '%s/%s/%s' % (p_path,path,_f) print('--- [%s]' % fn) fft.create_fft(fn)
def choose_fft(filename, choice): filename = get_wav(filename) if choice == '0': plot_time_amplitude(filename) elif choice == '1': plot_frequency_content(filename) elif choice == '2': fft = create_fft(filename) plot_stft(fft)