Fourier Transform on a .wav File

Hi,
I have a .wav file. When you play this now, you will only hear noise. But there is a hidden message in it. To hear what the message is, I will have to perform a Fourier Transformation. I tried a lot of things, but nothing works and I really don't know why.
[y,Fs] = audioread('Audiofile.wav')
x = fft(y)
audiowrite('Fourier.wav',x,Fs)
This is what I have right now, but still I only hear noise... When I plot the data, nothing appears, just an empty plot... I would be really happy if someone could help me with this problem!

 Accepted Answer

Image Analyst
Image Analyst on 15 Dec 2017
Edited: Image Analyst on 15 Dec 2017
Well there's something there, but I can't quite understand it. Some kind of voice.
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 20;
[y, Fs] = audioread('Audiofile.wav');
% sound(y,Fs);
x = fft(y);
figure;
subplot(3, 2, 1)
xr = real(x);
xi = imag(x);
plot(xr, 'b-');
% plot(xr(1:7000), 'b-');
grid on;
title('real(x)', 'FontSize', fontSize);
subplot(3, 2, 3)
plot(xi, 'b-');
% plot(xi(1230:6140), 'b-');
grid on;
xticks(0:10000:120000);
title('imag(x)', 'FontSize', fontSize);
subplot(3, 2, 5)
plot(abs(x), 'b-');
grid on;
title('abs(x)', 'FontSize', fontSize);
% Inverse fft just the imaginary part
% xi([105000:end]) = 0;
y2 = ifft(xi);
% y2 = ifft(xi(1230:6140));
y2r = real(y2);
y2i = imag(y2);
subplot(3, 2, 2)
plot(y2r, 'b-');
grid on;
title('real(y2)', 'FontSize', fontSize);
subplot(3, 2, 4)
plot(y2i, 'b-');
grid on;
xticks(0:10000:120000);
title('imag(y2)', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.1, 1, 0.7]);
soundsc(y2i, 0.7*Fs);
% soundsc(flipud(y2i), 0.75*Fs); % Play in reverse
The last half looks like the first half in reverse. If you play just the first half, followed by the last half in reverse,
yy = [y2i(1:end/2); flipud(y2i(end/2+1:end))];
soundsc(yy, 0.7*Fs);
it sort of sounds like 'Billy Crystal awesome! Billy Crystal awesome!" but you might understand it better than me.

More Answers (1)

Image Analyst
Image Analyst on 14 Dec 2017
You could try spectrogram(). But probably, you'll need to know how the secret message was encoded. It's doubtful that the FT itself is the message. If you just recorded a message and inverse FT'ed it and played it as an audio file, the audio file would not sound like anything normal, like music or whatever - it would just sound like noise or gibberish. So if they did something like took a song and Fourier transformed it and then somehow embedded the message into it, you'd need to know the algorithm for decodeing/extracting the message from the FT.

5 Comments

In the first place I want to thank you for your answer. I am a little confused right now. I Will try to translate the assignment that I got. Maybe I am thinking about it in the wrong way.
"the suspicion is that there's more information in the fragment than visible in the time-domain. By using the frequention-domain its possible to look at it in a different way, and it May be possible to see the information (which is hidden in the time-domain)."
The gave no further information, so it has to be possible in some way, but I really dont know how to do it :(
Perhaps by looking at the spectrogram you will find an unusual amount of energy at in some wavelength range. Like it was recorded with very high sampling rate, far above what we can hear, and you notice there is some strange signal above 20 kHz or below 30 Hz or somewhere. Did you run spectrogram()? Or even plot the fft? If not why not?
Annika Brenkman
Annika Brenkman on 14 Dec 2017
Edited: Annika Brenkman on 14 Dec 2017
I did make a plot and a spectrogram (I added them as an attachment). Maybe you can see something unusual or something, cause to me it looks like random, pretty evenly spread energy. And the plot (which I can not save for some reason, the program just stops working when I try) appears just empty..
You keep forgetting to attach the wave file. It looks pretty much like white noise, with some kind of change after 33,000 and 54,000 samples. What does it sound like?
Sorry, I zipped the.wav file now and attached it; I couldn't attach it as a wav-file.. Thanks a lot again by the way for your time and help!

Sign in to comment.

Categories

Find more on Signal Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!