I am trying to do speaker conversion by frequency warping method. I modify the function Spectrum_shiftFrequencies() in Praat by scaling the FFT spectrum of a voice. When one scaling factor is multiplied to spectrum, the timbre of source voice is changed and the voice quality is good. However, using multiple scaling induces several frequency bands of echos into the synthesis audio. I guess that the multiple scaling method breaks the phase information of a spectrum.
Fig.1 single scaling and multiple scaling
Here is the code that I modify in Spectrum_shiftFrequencies() in Praat.
for (long i = 1; i <= thy nx; i++) { //scan target frequency component
double thyf = thy x1 + (i - 1) * thy dx; // target freq
double myf = 0; // from source freq
if(thyf>0 && thyf <=target_formant[0]) // 2 scaling
myf=thyf*source_formant[0]/target_formant[0];
else
myf=source_formant[0] + (thyf-target_formant[0])*(my xmax-source_formant[0])/(my xmax-target_formant[0]);
if (myf >= my xmin && myf <= my xmax) {
double index = Sampled_xToIndex (me, myf); // index: source freq index
thy z[1][i] = NUM_interpolate_sinc (my z[1], my nx, index, interpolationDepth);
thy z[2][i] = NUM_interpolate_sinc (my z[2], my nx, index, interpolationDepth);
}
}
The real and image parts of target spectrum are interpolated from source spectrum. After checking the amplitude spectrum of synthesis audio, the contour of spectrum is changed as the expected scaling function. The phase spectrum is also changed, but that induces echo.
Does the phase spectrum require special process in this multiple scaling (nonlinear) conversion? or How to eliminate the echo ? or What is the correct phase conversion of this frequency mapping ?
Any help is appreciated. Thank you.