# How do I warp a 1 dimensional signal in frequency domain?

I want to implement VTLN (Vocal Tract Length Normalization).

It is equivalent to warping the signal in the frequency domain according to the following graph.

I can't wrap my head around how one implements such a transformation.

Suppose y = fft(x).

What should be y2 = f(y)?

What do I do after getting the warped frequency?

suppose x = [1, 2, 3, 4, 5]

y = f(X) = [ 10, 20, 30, 40, 50]

x_warped = [ 1, 1, 2, 4, 5].

What should y_warped[] be?

Do we delete some values and repeat some values in the y sequence?

is y_warped = [10, 10, 20, 40, 50]?

Image taken from

The mapping in this specific figure is basically a "lookup table" that maps $$\omega$$ to $$\tilde{\omega}$$ and the process in detail is outlined in section 5 of the paper that you link.

But on the point of applying that to a series, a function that effects such a transformation that is controlled by a parameter $$\alpha$$ is $$f(x) = x^\alpha, x\in \left[0..1 \right]$$ and $$x \in \mathbb{R}$$.

For example (Using Octave but easily extendable to other platforms):

function y=f(x,a) y=x.^a;end;
x = 0:0.001:1;
plot(x,f(x,1),x,f(x,2),x,f(x,1./2));
xlabel('x');ylabel('f(x)');
legend("x","x^2","x^{0.5}");
grid on;

Would give you:

Notice here that this is slightly different than the transform that you have with respect to the behaviour of the function with $$\alpha$$. I am using this for illustrative purposes here.

Notice also that because $$x \in \left[0..1 \right]$$, we can transpose that function to whatever limits we like. In your particular example it is $$\pi$$ or the number of bins of your Frequency Transform. Let's call that $$N_{FT}$$.

To apply the transform, you can either discretise the function or evaluate it on the fly. For example:

x_lookup = round(N_FT .* f(x/N_FT,alpha));

In this case, your input frequency transform bin would be x and that would have to now appear in bin x_lookup.

Notice here that x/N_FT to make sure that x stays within the range $$0..1$$ (assuming of course its lowest value is 0 here).

Again, section 5 contains all the details for specific f(x) functions you will need to effect this kind of mapping for a specific application.

Hope this helps.

• Thank you but one part is still unclear to me. What do I do after getting the lookup frequency? suppose x = [1, 2, 3, 4, 5] y = [ 10, 20, 30, 40, 50] x_warped = [ 1, 1, 2, 4, 5]. What should y_warped[] be? Do we delete some values and repeat some values in the y sequence? is y_warped = [10, 10, 20, 40, 50]? Dec 18 '18 at 23:46
• @user87466 There is no x,y pair. There is only a series of numbers x from which you generate a series of numbers x_warped. x and x_warped are not entirely accurate here because $\omega$ is the index of the FFT bin. Therefore, index and index_warped is interpreted as "The harmonic at index has to be moved to index_warped". A very good illustration of this is available in Fig.3 of the paper that you link.
– A_A
Dec 19 '18 at 8:26