LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the speed (tempo) of the voice without changing the pitch?

Dear colleagues, perhaps someone who is familiar with Audio/DSP can help me.

For educational purposes, I would like to slow down the tempo of an audio recording without changing the pitch, similar to what Audacity can do.

Simply changing the dt caused a very low pitch, which is really annoying. Audacity can do better, but I would like to do this programmatically from a given waveform.

Any idea which processing needs to be applied? Thank you in advance.

VI (LV2018) with audio sample is attached.

0 Kudos
Message 1 of 7
(392 Views)

I think the term is audio time stretching:

Audio time stretching and pitch scaling - Wikipedia

 

Not really a practical solution (e.g. the STFT is in LV, but the inverse isn't (yet)), but it might help you google for solutions.

Message 2 of 7
(355 Views)
You will need to resample the audio data to match the new dT.

"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 7
(346 Views)

@JÞB wrote:
You will need to resample the audio data to match the new dT.

That will give you the original signal, but resampled.

 

The problem is much harder.

 

The audio has a frequency range, and the speech too. You want to decrease the speech frequencies, but not the audio frequencies. 

0 Kudos
Message 4 of 7
(325 Views)

wiebe@CARYA wrote:

@JÞB wrote:
You will need to resample the audio data to match the new dT.

That will give you the original signal, but resampled.

 

The problem is much harder.

 

The audio has a frequency range, and the speech too. You want to decrease the speech frequencies, but not the audio frequencies. 


Yes, this is true. Let’s imagine a pure sine tone signal at 440 Hz. If we would like to increase its length, then additional periods need to be inserted into the waveform to maintain the overall frequency. This is fairly easy in the case of a pure sine wave, but it becomes a bit more complicated with real voice signals. Therefore, we should work in the frequency domain using STFT. I found a MATLAB script where a phase vocoder is implemented. I may reimplement this in LabVIEW, (I had hoped that someone had already completed this exercise). I also have some ideas on how to approach this using wavelets. For now, I've discovered a very simple solution called the Rubber Band Audio Time Stretcher Library, which implements a high-quality time stretcher that works significantly better than Audacity, with almost no distortions. The only minor drawback is that I need to temporarily save the waveform as a *.wav file, perform the stretching with command line tool, and then load it back, but everything works quite well.

Message 5 of 7
(260 Views)

Hi

 

I guess what you want to do is covered in the commercial product Auto-Tune.

 

With Antares as the original company inventing it. Interesting development story by the way.

 

Regards

 

0 Kudos
Message 6 of 7
(236 Views)

@Andrey_Dmitriev wrote:
which implements a high-quality time stretcher 

I could use a high-quality time stretcher 😎.

 

That project is open source and seems to be documented pretty well:

 

Rubber Band implements pitch-shifting using the standard technique of resampling before or after a time stretch, with the combination of resampling in one direction and stretching in the other resulting in returning the audio to its original duration but with different pitch. This method has the advantage of making the amount of pitch adjustment extremely accurate and stable, even for small changes.

Of course the 'academic' language is quite different from 'programmer' language.

0 Kudos
Message 7 of 7
(226 Views)