# make a voice sound signal play faster

Suppose $$x(t)$$ is a signal containing a voice. How can one derive a signal playing the same voice faster.

I tried $$x(t+\lfloor{100t\rfloor}/100)$$ to double the speed; But it adds a buzz sound. Is there a better formula?

Clearly $$x(2t)$$ changes the voice. I want to change just the speed.

• See other posts that mention “phase vocoder”; changes the speed without changing the pitch or vice versa – Dan Boschen Oct 28 '18 at 2:41

You can increase the sampling rate, instead of the signal $$x(nT_s) = x(n/F_s)$$, you can play it at say $$\frac{11}{10}F_s, \frac{12}{10}F_s, \text{or}\ 2F_s$$. So you have: \begin{align} x\left(\frac{n}{\frac{11}{10}F_s}\right) &=x\left(\frac{10n}{11F_s}\right) = x\left(n\frac{10}{11}T_s\right)\\ x\left(\frac{n}{\frac{12}{10}F_s}\right) &=x\left(\frac{10 n}{12F_s}\right) = x\left(n\frac{10}{12}T_s\right)\\ x\left(\frac{n}{2F_s}\right) &=x\left(\frac{1}{2}\frac{n}{F_s}\right) = x\left(n\frac{1}{2}T_s\right) \end{align} In MATLAB for instance, you can try the code below.

clear all

sound(y, Fs) % original
sound(y, 1.1*Fs) % at 1.1*Fs
sound(y, 1.2*Fs) % at 1.2*Fs
sound(y, 2*Fs) % at twice Fs


Gradually increasing the frequency to hear the changes in speed. You can try even higher, like 4 times, to hear the differences. The handel.mat file should be in there by default.

EDIT:

You $$x(t)$$ in your program is samples of the signal for a certain time duration, check how many samples you have per second (i.e. the sampling rate or frequency $$F_s$$), and $$T_s = 1/F_s$$. And $$x(t) = x(nT_s) = x(n/F_s)$$ with $$n = 0, \ldots, N-1$$ where $$N$$ is the number of samples. Taking a higher $$F_s$$ corresponds to taking smaller $$T_s$$.

• Thanks. But I have C# program which gets $x(t)$ as a continuous function and uses it to produce a wave file. I have the sampling machine code but I prefer to change $x(t)$ itself. Can you recommend a change in $x(t)$? – Minimus Heximus Oct 28 '18 at 12:09
• @nano please see my edit. – Gilles Oct 28 '18 at 14:06
• Isn't it the same as sampling $x(at)$ where $a$ is a constant? The problem with this is that the pitch changes. – Minimus Heximus Oct 28 '18 at 14:09
• @nano search DSP.SE for pitch shift or associated techniques (like "time stretching"). This is a frequent question on this board and you can find some useful stuff in addition to the method that Gilles is suggesting to you here. – A_A Oct 29 '18 at 9:53