Changeset 71ef9c2
- Timestamp:
- Mar 3, 2013, 9:33:29 PM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 68d0492
- Parents:
- 45f0f4a
- Location:
- python/tests
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_filterbank.py
r45f0f4a r71ef9c2 5 5 from numpy import random 6 6 from math import pi 7 from numpy import array 7 8 from aubio import cvec, filterbank 9 10 def array_from_text_file(filename, dtype = 'float'): 11 return array([line.split() for line in open(filename).readlines()], 12 dtype = dtype) 8 13 9 14 class aubio_filterbank_test_case(TestCase): … … 55 60 assert_equal ( f(c) > 0., True ) 56 61 62 def test_mfcc_coeffs_16000(self): 63 expected = array_from_text_file('filterbank_mfcc_16000_512.expected') 64 f = filterbank(40, 512) 65 f.set_mel_coeffs_slaney(16000) 66 assert_almost_equal ( expected, f.get_coeffs() ) 67 57 68 if __name__ == '__main__': 58 69 from unittest import main
Note: See TracChangeset
for help on using the changeset viewer.