sp-nitech / diffsptk

A differentiable version of SPTK
http://sp-tk.sourceforge.net
Apache License 2.0
164 stars 14 forks source link

bug: assertion error in frequency domain MLSA when `alpha=0` and `fft_length > 1021` #49

Closed yoyolicoris closed 1 year ago

yoyolicoris commented 1 year ago

As the title said, when using MLSA with mode="freq-domain", fft_length=1024, alpha=0, it triggers the assertion error at: https://github.com/sp-nitech/diffsptk/blob/16e6aa50a3c21ab6af8f91e39eeab45f46b1dad3/diffsptk/core/mgc2mgc.py#L67

This is due to the argument n_fft of MelGeneralizedCepstrumToSpectrum is not exposed to FrequencyDomainFIRFilter so it's always 512. https://github.com/sp-nitech/diffsptk/blob/16e6aa50a3c21ab6af8f91e39eeab45f46b1dad3/diffsptk/core/mglsadf.py#L388-L394

Is it intentional? I propose to add n_fft as an argument to FrequencyDomainFIRFilter.

takenori-y commented 1 year ago

Thank you for your report. I fixed the problem as you suggested. I will update pip at early next month.

yoyolicoris commented 1 year ago

Take your time. Thanks for the speedy response!