Giter VIP home page Giter VIP logo

lyon's Introduction

Build Status

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.c and sosfilters.c (removed MEX-related part).
  • ctypes wrapper for soscascade(), agc() and sosfilters() 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

lyon's People

Contributors

akademi4eg avatar

Stargazers

 avatar David GERARD avatar  avatar  avatar Johannes H. Jensen avatar Anuranan Das avatar LiQia0Qia0 avatar  avatar Eugene Karaulov avatar Yuichi KATORI avatar Eric Wilbanks avatar XQ10 avatar fikrihakim avatar  avatar  avatar Etienne Richan avatar Vincent Lostanlen avatar sciforce avatar  avatar Dmytro Sabodashko avatar

Watchers

James Cloos avatar  avatar Eugene Karaulov avatar Veronika Herasymenko avatar  avatar

lyon's Issues

Cant run this program on anaconda 3

Hi.
I'm new to python env. i've tried to run this code on windows via notebook.
However Im gerring this error : cannot import name 'LyonCalc'

Choose the number of channels with LyonCalc(

Hi,

I'm using the code in this repository to process audio files recorded at 8kH of various lengths.
I would like all my cochleograms to have the same number of channel, that I would like to be able to specify.

So far, I have been able to do so by adjusting the step_factor, but I was wandering if there was a better more deterministic way to do that.

Best regards,
David

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.