Python port of Lyon's model from AuditoryToolbox
Lyon's auditory model for Python
Python port of Lyon's model calculation from Auditory Toolbox. Original version of Auditory Toolbox is written in C and MATLAB by Malcolm Slaney.
sosfilters.c(removed MEX-related part).
- Translation from MATLAB to Python for files necessary for successfull call to
If you plan to build manually and run tests, you'll need
On Ubuntu 18.10 run:
sudo apt-get install check
Build a library:
This would result in
liblyon.so shared library. Verify that library is properly built by running a test suite:
The following code computes cochleogram for a sample sound:
from lyon import LyonCalc calc = LyonCalc() waveform, sample_rate = load('audio/file/path.wav') decimation_factor = 64 coch = calc.lyon_passive_ear(waveform, sample_rate, decimation_factor) print(coch.shape)
The code above should output shape of resulting auditory nerve response:
[<number of samples / decimation_factor>, 86].
lyon_examples.py for examples on running other functions.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size lyon-1.0.0-py3-none-any.whl (12.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size lyon-1.0.0.tar.gz (9.3 kB)||File type Source||Python version None||Upload date||Hashes View|