- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_simple_spectral_weighting.py
r2d88f41a r4120fbc 14 14 if __name__ == '__main__': 15 15 if len(sys.argv) < 2: 16 print 'usage: %s <inputfile> <outputfile>' % sys.argv[0]16 print('usage: %s <inputfile> <outputfile>' % sys.argv[0]) 17 17 sys.exit(1) 18 18 samplerate = 0 … … 23 23 24 24 win_s = 512 # fft size 25 hop_s = win_s / 2 # hop size25 hop_s = win_s // 2 # hop size 26 26 pv = pvoc(win_s, hop_s) # phase vocoder 27 27 … … 31 31 zeros( 50 ), 32 32 1.3 * hanningz(100), 33 zeros (win_s / 2 + 1 - 40 - 50 - 100),33 zeros (win_s // 2 + 1 - 40 - 50 - 100), 34 34 ] ) 35 35 … … 53 53 total_frames += read 54 54 55 print "read", total_frames / float(samplerate), "seconds from", f.uri 55 duration = total_frames / float(samplerate) 56 print("read {:.3f}s from {:s}".format(duration, f.uri))
Note: See TracChangeset
for help on using the changeset viewer.