Closed jiqizaisikao closed 6 years ago
For this reason ,The instantant frequency obtainted are wrong,but harverst uses the instantant frequency heavily,so the out pitches are wrong sometimes.
Thank you for your comment. Since I don't have enough time to check it during this week, please wait for a while.
The main problem of confusion is the FFT library I used. The sign of the imaginary part is reversed compared with MATLAB version. I may mistake the modification of the equation for calculating the instantaneous frequency.
I checked my source code and confirmed that the cause is the difference between FFTW and FFT function used in WORLD. In the calculated spectrum, the sign of imaginary part is reversed between them. This processing is not wrong in cases where the WORLD's FFT function is used.
If you can wait for a few days, I'd like to modify the FFT function in WORLD to get the compatibility between them. Since there are several functions that use FFT, I must check all source codes. I need several days to modify and to check it. (I will complete the modification within next Tuesday at the latest.)
I uploaded the new version. I think that you will be able to use FFTW without the particular modification for WORLD.
but,i test fftw and your fft function are the same,they out put the same,maye i was wrong
the function void Harvest::GetSpectra(...) main_spectrum[i][1] = -forward_real_fft->spectrum[i][1] it seems that the wright one is: main_spectrum[i][1] = forward_real_fft->spectrum[i][1] It is a small mistake that will not cause a lot of pitch errors,but If you tried the other Harvest matlab source code ,than you will find their results are different(It seems that their algorithms are all the same)。The pitches obtained by matlab version are more smooth and have little jumping pitch points.Your programe gets some errs sometimes. After I fixed it,their resluts are neally the same,so maybe it is wrong,and I checked my fftw(I replaced the fft lib with fftw,but the fftw output are the same with your fft lib),so there is no need to add a minus sign.