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
Manual
Build a library:
make lib
This would result in liblyon.so shared library. Verify that library is properly built by running a test suite:
make 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 lyon_examples.py for examples on running other functions.
Links
Metadata
Release files for lyon 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lyon-1.0.0.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lyon-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / lyon-1.0.0.tar.gz
| Download URL | lyon-1.0.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb5cfcd9f1c55d816446101efccb0195c2c5afb97ffb3f2b88c8a4962d4f483f
|
|
BLAKE2b-256 checksum How to use checksums |
3da491e2a3e1faf44c9abbcd56b55e9888e5db33d138edc763e1ac6f1b04523a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.7
|
Release files / lyon-1.0.0-py3-none-any.whl
| Download URL | lyon-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6333a2c53fb4c4053b7d95003f60fe1fa7667c9a34a823a7194682fc5bd504f4
|
|
BLAKE2b-256 checksum How to use checksums |
fb355874a84caaf5aa76a948040e3750aa01f85a7f292df415d0b8d1e3913adb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.7
|