Fourier Transform on a .wav File

18 次查看(过去 30 天)
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!

采纳的回答

Image Analyst
Image Analyst 2017-12-15
编辑:Image Analyst 2017-12-15
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.

更多回答(1 个)

Image Analyst
Image Analyst 2017-12-14
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 个评论
Image Analyst
Image Analyst 2017-12-14
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?
Annika Brenkman
Annika Brenkman 2017-12-14
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!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by