Gammatone
This merge request adds the new module gammatone.py
which contains the following two classes:
- GammatoneFilterBank
- AuralFeatures
This module introduces three new dependencies,
- Dave/MERIDIAN's
aural-features
package - Scipy>=1.6
- Python>=3.7
However, at present I don't think we are interested in enforcing these dependencies for all ketos user, especially not the requirement Python>3.7. So, instead I have implemented the following checks and printing of warning messages:
if 'aural' not in sys.modules:
try:
import aural.meridian as au
except ImportError:
print('aural-features package not found.')
print('aural-features is required by the AuralFeatures class.')
print('install with `pip install aural-features`.')
print('note that aural-features requires Scipy>=1.6 and Python>=3.7')
sys.exit(1)
and,
if Version(scipy.__version__) < Version("1.6.0"):
print('The `compute_filter_coeffs` method in the `gammatone` module requires Scipy>=1.6.0')
print(f'The present environment only has Scipy=={Version(scipy.__version__)}')
print('Note that Scipy>=1.6.0 requires Python>=3.7.0')
exit(1)
Note that this merge request also,
- changes our Python requirement from <3.8 to <=3.8
- updates our CI script to pull a newly created docker image, which has Scipy 1.6 and Python 3.7