feature/cnnfeature/crepefix/ffmpeg5
Last change
on this file since 7b8e51c was
4120fbc,
checked in by Paul Brossier <piem@piem.org>, 8 years ago
|
python/demos: python3 and double precision compatibility
|
-
Property mode set to
100755
|
File size:
516 bytes
|
Rev | Line | |
---|
[7175ed4] | 1 | #! /usr/bin/env python |
---|
[913ee14] | 2 | |
---|
| 3 | from aubio import filterbank |
---|
[8fb567c] | 4 | from numpy import arange, vstack |
---|
[913ee14] | 5 | |
---|
| 6 | win_s = 8192 |
---|
| 7 | samplerate = 16000 |
---|
| 8 | |
---|
| 9 | f = filterbank(40, win_s) |
---|
| 10 | f.set_mel_coeffs_slaney(samplerate) |
---|
| 11 | |
---|
| 12 | from pylab import loglog, title, show, xlim, ylim, xlabel, ylabel |
---|
| 13 | xlim([0,samplerate / 2]) |
---|
[4120fbc] | 14 | times = vstack([arange(win_s // 2 + 1) * samplerate / win_s] * 40) |
---|
[913ee14] | 15 | loglog(times.T, f.get_coeffs().T, '.-') |
---|
| 16 | title('Mel frequency bands coefficients') |
---|
| 17 | xlim([100, 7500]) |
---|
| 18 | ylim([1.0e-3, 2.0e-2]) |
---|
[3cd2434] | 19 | xlabel('Frequency (Hz)') |
---|
| 20 | ylabel('Amplitude') |
---|
[913ee14] | 21 | show() |
---|
Note: See
TracBrowser
for help on using the repository browser.