r9y9 / pysptk

A python wrapper for Speech Signal Processing Toolkit (SPTK).
http://pysptk.readthedocs.io/en/latest/
Other
441 stars 79 forks source link

Fix test failure in LSPDF-based synthesis #22

Closed r9y9 closed 6 years ago

arielephrat commented 8 years ago

When trying to use LSPDF after applying lpc2lsp, I keep getting "ParameterError: Audio buffer is not finite everywhere". Is this the bug you're referring to? If so, has there been any progress in fixing it? Or, alternatively, are there plans to implement an lsp2lpc function?

Thanks so much!

r9y9 commented 8 years ago

No, as I remember correctly it wasn't a ParameterError. Could you paste your code so that I can reproduce the issue? For now there is no plan to implement lsp2lpc from scratch.

r9y9 commented 8 years ago

Tests failure is here: https://github.com/r9y9/pysptk/blob/097753171a493b265b20793537374c753d5148dc/tests/test_synthesis.py#L217-L219

arielephrat commented 8 years ago

Thanks for the quick response! I modified your test code and inserted it at the end of the speech analysis notebook. It now results in an AssertionError.

from pysptk.synthesis import LSPDF

order = 10
lpc = np.apply_along_axis(pysptk.lpc, 1, frames, order)
# make sure lsp has loggain
lsp = np.apply_along_axis(pysptk.lpc2lsp, 1, lpc)
lsp[:, 0] = np.log(lsp[:, 0])

# synthesis
synthesizer = Synthesizer(LSPDF(order), hop_length)
y = synthesizer.synthesis(source_excitation, lsp)
assert np.all(np.isfinite(y))
AssertionError                            Traceback (most recent call last)
<ipython-input-42-0aa71a6f3baa> in <module>()
     10 synthesizer = Synthesizer(LSPDF(order), hop_length)
     11 y = synthesizer.synthesis(source_excitation, lsp)
---> 12 assert np.all(np.isfinite(y))

AssertionError: 
r9y9 commented 8 years ago

Yes, this is what I was trying to solve.

arielephrat commented 8 years ago

Ok, at least we're on the same page :) The problem seems to be for orders out of the range [20,25] as well.

On Tue, May 24, 2016 at 4:02 PM, Ryuichi Yamamoto notifications@github.com wrote:

Yes, this is what I was trying to solve.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/r9y9/pysptk/issues/22#issuecomment-221261362

r9y9 commented 8 years ago

Is that the same issue you see before? This is not a ParameterError.

arielephrat commented 8 years ago

Yes, sorry. I got a ParameterError when I tried to plot the result using waveplot.

On Tue, May 24, 2016 at 5:01 PM, Ryuichi Yamamoto notifications@github.com wrote:

Is that the same issue you see before? This is not a ParameterError.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/r9y9/pysptk/issues/22#issuecomment-221279879