r/DSP • • 15d ago

Need help with a DSP project

Hi, I’m taking a DSP course and I have to do a project worth 15 points. I’ve been searching for ideas and I found this one (Speeding up audio recordings without changing the pitch of the voice). I’m not sure if it’s easy or difficult because I’m really struggling to understand the course. so if you have any advice or resources to help me get started, or even other project ideas. I’d be happy to hear them.

Thank you!

7 Upvotes

15 comments sorted by

10

u/QueueSevenM 15d ago

Hello noa_125422,

This problem is known as audio time-scaling. Like many things, you can get the best results if you know specific properties about the signal you are processing and use a specialized algorithm based on.

For the general case though (and presumably what you want for a simple project), there are basically two approaches. Those are the time-domain and frequency-domain approaches. Although there are several time-domain techniques, they all basically consist of cutting up the signal into fragments called grains and then shifting and copying these grains. In general though, the frequency-domain approaches is much better than the time-domain approaches, particularly for polyphonic signals.

The frequency-domain approach basically involves cutting up the signal into overlapping sections called frames, applying a window function to each one, and then taking the FFT. To actually time-scale the signal, some frames are dropped are duplicated. Importantly though, the phase of all subsequent frames has to be adjusted for each frame that is dropped or duplicated. Best results can be achieved using the phase-locked vocoder technique. Look for papers by Jean LaRouche, Jordi Bonada, and others from late 1990s to early 2000s.

Actually Jordi Bonada has a thesis on this topic that gives an overview on many of the common techniques: http://mtg.upf.edu/files/publications/Phd-2002-Jordi-Bonada.pdf

3

u/noa_125422 14d ago

Thank you so much!! I really appreciate your help.

2

u/QueueSevenM 14d ago

You're welcome

2

u/rb-j 14d ago

This guy knows what they're talking about. I'll spectate.

2

u/QueueSevenM 14d ago

Only barely :)

2

u/rb-j 14d ago

Looks solid to me.

I can cheer from the stands.

3

u/speedoinfraction 15d ago

For that idea you can do FFT to get the frequencies, then IFFT with overlap and add to put the buffers back together but over shorter periods. There are also more advanced techniques.

3

u/noa_125422 14d ago

Thank you for your help!

2

u/Live-Imagination4625 15d ago

There is a good talk about this on ADCs YouTube channel. Look it up. He explains the frequency domain approach quite well.

1

u/noa_125422 14d ago

I'll watch it now.
Thank you!!

1

u/noa_125422 14d ago

Could you share the channel link? I couldn’t find it.

1

u/Fredric_Chopin 15d ago

Echo removal

1

u/noa_125422 14d ago

That's a good idea!
Thank you!!

1

u/rb-j 14d ago edited 14d ago

We call this "Time Scaling" and it's closely related to the topic of Pitch Shifting (which is changing the pitch without changing the speed).

To do it well, it's reasonably hard but not terribly.

What is the platform you're working on? Since Time Scaling can't really be a real-time process (because the signal output time duration is not the same quantity as the input signal time duration), then you can do this off-line written in the language of your choice. You have to be able to read an input file and write to an output file.

People mentioned FFT-based approaches, and they can be fine. Sometimes a phasiness happens because different harmonics of the same note slide around relative to each other and the wave shape is not preserved. There are time-domain techniques, too, that do not use the FFT (unless you use the FFT to do pitch detection).

We can talk about either approach. I would like to know more about what platform you expect to do this with.

1

u/noa_125422 14d ago

I’m planning to use MATLAB since we’re already using it in the course lab. To be honest I’m not very good at it, but I’ll do my best.

I haven’t decided on a specific algorithm yet, as I’m still struggling to understand the different approaches.

Which one do you think is easier and good enough for testing the idea? I don’t want to go too deep into it. I just want to get the project done.