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=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.

  • $\begingroup$ Look into the phase vocoder algorithm. You need to measure the phase change between frames, and interpolate that phase delta with the frequency. $\endgroup$
    – hotpaw2
    Sep 20, 2017 at 4:04

1 Answer 1


After research works, I find that the answer is the pitch shift. The terminology is quite confusing. The proper term should be "frequency shift" because it changes the spectrum of signal, not only pitch but also formant.

Some useful resource is listed bellow:

Pitch Shifting Using The Fourier Transform

guitar pitch shifter


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.