how to unscramble a .wav file to find the actual voice?

13 views (last 30 days)
David Hagrid
David Hagrid on 12 Oct 2021
Edited: Image Analyst on 12 Oct 2021
Hi all, this question is a bonus question for my HW and its suppose to be something I am suppose to look up to solve. However, I have no idea what to look up on here to help me write this file. Can anyone direct me to the Mathworks page that could potentially help me solve this problem? I know how to read the .wav file and all, but I don't know how I can reorder this signal like its described. Any help would be appreciated.
You obtained a .wave file with a human voice signal that was scrambled. The positive frequency band 0 to Fs/2 was equally divided into four sub-bands. The original order of the subbands is ABCD. The sub-bands were then reordered to CBDA. The scrambled signal was generated by calculating the inverse DFT of the scrambled spectrum. The goal of this problem is for you to write a MATLAB program that will descramble the signal and recover the original voice signal that we can recognize. The DFT sampling range is from 0 to Fs. Because the Fourier transform of a real signal is conjugate symmetric, you only need to reorder the frequency band 0 to Fs/2 and then construct the remaining frequency samples using the conjugate symmetry property.

Answers (1)

Image Analyst
Image Analyst on 12 Oct 2021
Edited: Image Analyst on 12 Oct 2021
Try getting the fft, copying and pasting the chunks into their desired location (frequencies) and then inverse fft. Something like
ft = fft(y);
ftUnscrambled(f1:f2) = ft(f4:end); % Transfer over chunk A at the end.
ftUnscrambled(f2:f3) = ft(f2:f3); % Transfer over chunk B.
ftUnscrambled(f3:f4) = ft(1:f2); % Transfer over chunk C.
ftUnscrambled(f4:end) = ft(f3:f4); % Transfer over chunk D.
newSignal = ifft(ftUnscrambled);
Obviously you'll have to make some modifications, like doing this to both the real part of the FT and the imaginary part of the FT, figuring out what the proper indexes are, etc. But I'm sure you can do it.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by