{"id":27631195,"url":"https://github.com/sciforce/lyon","last_synced_at":"2025-04-23T17:43:59.751Z","repository":{"id":62577225,"uuid":"170098610","full_name":"sciforce/lyon","owner":"sciforce","description":"Python port of Lyon's model calculation from Auditory Toolbox.","archived":false,"fork":false,"pushed_at":"2019-02-12T09:20:20.000Z","size":20,"stargazers_count":20,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T16:52:48.176Z","etag":null,"topics":["audio-processing","c","python"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sciforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-11T09:05:27.000Z","updated_at":"2024-06-24T09:18:42.000Z","dependencies_parsed_at":"2022-11-03T19:10:26.769Z","dependency_job_id":null,"html_url":"https://github.com/sciforce/lyon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciforce%2Flyon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciforce%2Flyon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciforce%2Flyon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciforce%2Flyon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sciforce","download_url":"https://codeload.github.com/sciforce/lyon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249898789,"owners_count":21342410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-processing","c","python"],"created_at":"2025-04-23T17:43:59.128Z","updated_at":"2025-04-23T17:43:59.741Z","avatar_url":"https://github.com/sciforce.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/sciforce/lyon.svg?branch=master)](https://travis-ci.org/sciforce/lyon)\n\n# Lyon's auditory model for Python\nPython port of Lyon's model calculation from Auditory Toolbox.\nOriginal version of Auditory Toolbox is written in C and MATLAB by Malcolm Slaney.\n\n## Package contents\n* Modified `soscascade.c`, `agc.c` and `sosfilters.c` (removed MEX-related part).\n* `ctypes` wrapper for `soscascade()`, `agc()` and `sosfilters()` calls.\n* Translation from MATLAB to Python for files necessary for successfull call to `LyonPassiveEar()`.\n\n## Dependecies\nIf you plan to build manually and run tests, you'll need `libcheck` installed.\nOn Ubuntu 18.10 run:\n\n``` bash\nsudo apt-get install check\n```\n\n## Installation\n### PIP\n\n``` bash\npip install lyon\n```\n\n### Manual\nBuild a library and copy to installation location:\n\n``` bash\nmake -C c_src lib\ncp c_src/liblyon.so lyon/\n```\n\nyou can verify that library is properly built by running a test suite:\n\n``` bash\nmake -C c_src test\n```\n\n## Usage\nThe following code computes cochleogram for a sample sound:\n\n``` python\nfrom lyon import LyonCalc\n\ncalc = LyonCalc()\nwaveform, sample_rate = load('audio/file/path.wav')\ndecimation_factor = 64\ncoch = calc.lyon_passive_ear(waveform, sample_rate, decimation_factor)\nprint(coch.shape)\n```\n\nThe code above should output shape of resulting auditory nerve response: `[\u003cnumber of samples / decimation_factor\u003e, 86]`.\n\nSee `examples/lyon_examples.py` for examples on running other functions.\n\n## Links\n* [AuditoryToolbox page](https://engineering.purdue.edu/~malcolm/interval/1998-010/)\n* [Report describing function in toolbox](https://engineering.purdue.edu/~malcolm/interval/1998-010/AuditoryToolboxTechReport.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciforce%2Flyon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsciforce%2Flyon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciforce%2Flyon/lists"}