Changeset ff28d81
- Timestamp:
- Nov 17, 2018, 7:24:51 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- d06c9a4
- Parents:
- ab8e838 (diff), 62c2d00 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_mfcc.py
rab8e838 rff28d81 106 106 #print coeffs 107 107 108 109 class aubio_mfcc_fb_params(TestCase): 110 111 def test_set_scale(self): 112 buf_size, n_filters, n_coeffs, samplerate = 512, 20, 10, 16000 113 m = mfcc(buf_size, n_filters, n_coeffs, samplerate) 114 m.set_scale(10.) 115 m(cvec(buf_size)) 116 117 def test_set_power(self): 118 buf_size, n_filters, n_coeffs, samplerate = 512, 20, 10, 16000 119 m = mfcc(buf_size, n_filters, n_coeffs, samplerate) 120 m.set_power(2.) 121 m(cvec(buf_size)) 122 123 def test_set_mel_coeffs(self): 124 buf_size, n_filters, n_coeffs, samplerate = 512, 20, 10, 16000 125 m = mfcc(buf_size, n_filters, n_coeffs, samplerate) 126 m.set_mel_coeffs(0., samplerate/2.) 127 m(cvec(buf_size)) 128 129 def test_set_mel_coeffs_htk(self): 130 buf_size, n_filters, n_coeffs, samplerate = 512, 20, 10, 16000 131 m = mfcc(buf_size, n_filters, n_coeffs, samplerate) 132 m.set_mel_coeffs_htk(0., samplerate/2.) 133 m(cvec(buf_size)) 134 135 def test_set_mel_coeffs_slaney(self): 136 buf_size, n_filters, n_coeffs, samplerate = 512, 40, 10, 16000 137 m = mfcc(buf_size, n_filters, n_coeffs, samplerate) 138 m.set_mel_coeffs_slaney(samplerate) 139 m(cvec(buf_size)) 140 assert m.get_power() == 1 141 assert m.get_scale() == 1 142 108 143 if __name__ == '__main__': 109 144 from _tools import run_module_suite
Note: See TracChangeset
for help on using the changeset viewer.