Lyon
Python port of Lyon's model calculation from Auditory Toolbox.
Install / Use
/learn @sciforce/LyonREADME
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.
Package contents
- Modified
soscascade.c,agc.candsosfilters.c(removed MEX-related part). ctypeswrapper forsoscascade(),agc()andsosfilters()calls.- Translation from MATLAB to Python for files necessary for successfull call to
LyonPassiveEar().
Dependecies
If you plan to build manually and run tests, you'll need libcheck installed.
On Ubuntu 18.10 run:
sudo apt-get install check
Installation
PIP
pip install lyon
Manual
Build a library and copy to installation location:
make -C c_src lib
cp c_src/liblyon.so lyon/
you can verify that library is properly built by running a test suite:
make -C c_src test
Usage
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].
See examples/lyon_examples.py for examples on running other functions.
Links
Related Skills
node-connect
338.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
83.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
83.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
338.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
