mmorise / World

A high-quality speech analysis, manipulation and synthesis system
http://www.kisc.meiji.ac.jp/~mmorise/world/english
Other
1.17k stars 251 forks source link

fix decimate bug #69

Closed vlee78 closed 5 years ago

vlee78 commented 5 years ago

Compare with the world vocoder matlab implementation, when x_length is divisible with r, as it always add one, it exports the latest sample from the head expanded buffer to y[0]. This produces different results compare with the matlab simulation and I think the matlab result be the idea of the author. Following lines can both solve the problem and I prefer the second one. int nout = ceil(x_length / (float) r); int nout = (x_length-1) / r + 1;

mmorise commented 5 years ago

Thank you for your suggestion. Your idea is technically correct.

However, since my project is according to the Google style guide ( https://code.google.com/p/google-styleguide/ ), please modify your request from int nout = (x_length-1) / r + 1; to int nout = (x_length - 1) / r + 1;

After that, I will accept your idea and merge pull request.

vlee78 commented 5 years ago

Thanks to Dr. M.Morise, I have make the modification to conform the google code style.

mmorise commented 5 years ago

Thank you very much for your effort. I merge your PR soon.