How timbre shifting is done?

I've recently came across two programs - Morphvox, VCSdiamond that are able to preform pitch shift, but also timbre shift. As far as I know the timbre is nothing but the amplitude of the harmonics in the signal. I'm looking for any algorithm or hopefully implementation in python that does exactly that. I've read a lot of papers but couldn't any find specific solution.

Example of what I'm talking about:

• The human voice is often modelled as an impulse train sent through a filter representing all the resonances (formants) of our vocal tract. If you know the pitch of the sound, you can interpolate between the harmonics to guess that filter, undo that filter and re-apply a similar filter but scaled up/down in frequency (modelling a different size of vocal tract). I've seen this done with FFTs/STFT, or with all-pole IIR filters (in an LPC model). Nov 7, 2021 at 12:06
• Thanks, what do you mean by scaled down in frequency? Do you mean frequency shift or amplitude modification? Nov 7, 2021 at 12:28
• Frequency shift - so if the original filter has two peaks at 1kHz and 2kHz, maybe you'd undo that and apply a similar filter with peaks at 1.5kHz and 3kHz. Nov 7, 2021 at 14:34
• How is it different from shifting the pitch from 1hz to 1.5hz ? Doesn't the timbre change suppose to effect the amplitude of the harmonics? Becouse the harmonic frequancies is determined by the pitch ? Nov 7, 2021 at 21:07
• this is an formant shift, do you need warp the spectral envelope. you can do it using a cepstrum to extract the spectral envelope of the signal and than apply a factor on that envelope to change it, take the idea here link Nov 8, 2021 at 11:43