Librosa: Support for LPC

Created on 13 Jun 2018  路  3Comments  路  Source: librosa/librosa

In general, there's not a great way to extract LPC coefficients in Python. The main way that I've seen referenced is talkbox (https://github.com/cournape/talkbox), but it's quite out of date at this point and doesn't support Python 3. I've done some work for updating the talkbox code for python 3 (https://github.com/mmcauliffe/Conch-sounds/blob/master/conch/analysis/formants/lpc.py), but it's implemented in Python rather than anything faster (there's also this python implementation in a PR here: https://github.com/jsawruk/pymir/pull/8/files/1ac978c5120ed93689095535b432630792be6843?diff=split&short_path=04c6e90).

Is there any chance of implementing LPC in librosa? The recommended route for migrating from talkbox for mfcc generation is to go to librosa, so it'd be nice if LPC generation could be done here as well.

functionality

Most helpful comment

What about the SPTK's implementation? I am maintaining a python wrapper: https://github.com/r9y9/pysptk and it supports both python 2 and 3. The core is implemented in C so it should be faster than naive python. lpc: http://pysptk.readthedocs.io/en/latest/generated/pysptk.sptk.lpc.html#pysptk.sptk.lpc.

All 3 comments

What about the SPTK's implementation? I am maintaining a python wrapper: https://github.com/r9y9/pysptk and it supports both python 2 and 3. The core is implemented in C so it should be faster than naive python. lpc: http://pysptk.readthedocs.io/en/latest/generated/pysptk.sptk.lpc.html#pysptk.sptk.lpc.

Is there any chance of implementing LPC in librosa? The recommended route for migrating from talkbox for mfcc generation is to go to librosa, so it'd be nice if LPC generation could be done here as well.

That would be great to have, and I'm happy to help out if someone wants to take the lead on it.

Re: speed, I was going to suggest numba-jitting the code you linked, but it seems like you've already tried that (commented out)? I haven't implemented lpc before, but I would expect that a numba implementation could be fast enough for regular use. If we have a reference implementation that we trust, even if it's slow, that would be quite helpful in developing a faster implementation.

Merged in #797

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edne picture edne  路  3Comments

juanbraga picture juanbraga  路  3Comments

lostanlen picture lostanlen  路  4Comments

mattc-eostar picture mattc-eostar  路  3Comments

GPrathap picture GPrathap  路  3Comments