Confusion about how to use LPC, and the Numerical Error it gives
See original GitHub issueDescribe the bug I don’t understand what the Numerical error, input ill-conditioned?" error means in the LPC function, and I also find the documentation a bit confusing, as it doesn’t really specify how I can use the LPC function.
To Reproduce
import numpy as np
import librosa
y = np.sin(np.arange(100) * 0.1) * 0.1
y_hat = librosa.lpc(y, 16) # throws said error here
Software versions*
>>> import platform; print(platform.platform())
Windows-10-10.0.19041-SP0
>>> import sys; print("Python", sys.version)
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
>>> import numpy; print("NumPy", numpy.__version__)
NumPy 1.17.0
>>> import scipy; print("SciPy", scipy.__version__)
SciPy 1.4.1
>>> import librosa; print("librosa", librosa.__version__)
librosa 0.7.1
>>>
>>> librosa.show_versions()
INSTALLED VERSIONS
------------------
python: 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
librosa: 0.7.1
audioread: 2.1.8
numpy: 1.17.0
scipy: 1.4.1
sklearn: 0.22
joblib: 0.14.1
decorator: 4.4.1
six: 1.12.0
soundfile: 0.10.3
resampy: 0.2.2
numba: 0.46.0
numpydoc: None
sphinx: None
sphinx_rtd_theme: None
sphinxcontrib.versioning: None
sphinx-gallery: None
pytest: None
pytest-mpl: None
pytest-cov: None
matplotlib: 3.1.2
presets: None
Additional context I’m trying to use LPC to resynthesize speech from a given audio sample, however I struggle to understand how I should do this and how I have to use LPC in general. From what I understand from here: https://www.fon.hum.uva.nl/rob/VocalTractExamples/ It’s possible to use LPC to get the filter coefficients for source-filter synthesis, which is what I’m tying to do.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:26 (19 by maintainers)
Top Results From Across the Web
Linear Predictive Coding in Python
Linear Predictive Coding (LPC) is a method for estimating the coefficients of a Source-Filter model (post) from a given data. The input consists ......
Read more >Linear Predictive Coding is All-Pole Resonance Modeling
Linear predictive coding (LPC) is a widely used technique in audio signal processing, especially in speech signal processing. It has found particular use...
Read more >Intermediate LPC - Chapter 3: Complex Data Types
An array is a powerful complex data type of LPC which allows you to access multiple values through a single variable. For instance,...
Read more >Intermediate LPC manual - Department of Computer Science
Some operators and functions will even give errors if you use them with the wrong data types. For example, "a"+"b" is handled much...
Read more >manual UM10375, aplic. note AN11229 confusing - NXP Community
Next, the minimum number of bytes to be copied to flash is 256: in case of lesser ... they would use mxli's option...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Incidentally, it’s long been on my todo list to put together an example notebook that demos source filter separation and synthesis by analysis using LPC, maybe it’s time to pick that back up…
In terms of analysis, I have a branch (https://github.com/ajweiss/librosa/tree/lpcspec) that implements both a short time LPC transform (windowed LPC coeffs) and also a function that then takes those coefficients and computes their spectrum. It hasn’t been touched in quite a while, but is a pretty good start (I think) on the analysis side of things. What were you thinking in terms of analysis? I’ve been thinking about dusting this off for quite some time.
I’d also be interested in collaborating on examples. In general I was considering LPC spectral analysis and perhaps a basic compression demo… What did you have in mind?