feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 927f630 was
25c9f9a,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
move new python module to the top
|
-
Property mode set to
100755
|
File size:
376 bytes
|
Rev | Line | |
---|
[7175ed4] | 1 | #! /usr/bin/env python |
---|
[b0ac9cd] | 2 | |
---|
| 3 | import sys |
---|
| 4 | from aubio import source |
---|
| 5 | |
---|
| 6 | if __name__ == '__main__': |
---|
| 7 | if len(sys.argv) < 2: |
---|
| 8 | print 'usage: %s <inputfile>' % sys.argv[0] |
---|
| 9 | sys.exit(1) |
---|
| 10 | f = source(sys.argv[1], 8000, 256) |
---|
| 11 | total_frames, read = 0, 256 |
---|
| 12 | while read: |
---|
| 13 | vec, read = f() |
---|
| 14 | total_frames += read |
---|
| 15 | print "read", total_frames / float(f.samplerate), "seconds from", f.uri |
---|
Note: See
TracBrowser
for help on using the repository browser.