我正在尝试解密隐藏在非常嘈杂的音频文件(.wav)中的消息(我认为这是白噪声和额外的低无人机)。该消息是一个六位数的数字。我没有关于噪音的更多细节。
我尝试使用低通滤波器,以期消除大多数较高的频率将使我能够听到这些数字,但是,我似乎也无法摆脱足够多的低架无人机,从而听不到声音。我的尝试如下(freq_space_low_pass_filter
在最后包含所使用的函数):
[data, SampleRate, NbitsPerSample]=wavread('noisy_msg6.wav');
y=data(:,1); % we will work only with one channel in this demo
N=length(y); %number of sample points
t=( (1:N)*1/SampleRate ).'; % time spacing is 1/SampleRate and we want column vector
Y=fft(y);
spectrum_freq=fourier_frequencies(SampleRate, N);
Freq3db=100;
[spectrum_filtered,g_vs_freq]=freq_space_low_pass_filter(Y, SampleRate, Freq3db);
y_filtered=ifft(spectrum_filtered);
y_filtered=real(y_filtered);
wavwrite(y_filtered/(0.1+max(y_filtered)), SampleRate, NbitsPerSample,
'noisy_msg6_filtered.wav');
%%%%%%%%down sampling%%%%%%%%
indexes=(abs(spectrum_freq) < 10*Freq3db);
spectrum_freq_down_sampled = spectrum_freq(indexes);
spectrum_down_sampled = spectrum_filtered(indexes);
N_down_sampled = length(spectrum_down_sampled);
spectrum_down_sampled=spectrum_down_sampled*N_down_sampled/N;
SampleRate_down_sampled=SampleRate*N_down_sampled/N;
y_down_sampled=real(ifft(spectrum_down_sampled));
t_down_sampled = ( (1:N_down_sampled)*1/SampleRate_down_sampled ).';
sound(y_down_sampled, SampleRate_down_sampled)
function [spectrum_filtered,g]=freq_space_low_pass_filter(spectrum, SampleRate, Freq3db)
%% applies low pass filter in the frequency domain
% spectrum - result of fft on time series data (column vector is expected)
% SampleRate - measured in Hz, 1/dt where dt spacing of the points in time domain
% Freq3db - desired 3db roll off point in Hz
N=length(spectrum);
function G=filter_gain(freq, Freq3db)
G=1./(1+1i*freq/Freq3db); % this corresponds to low pass RC filter
end
spectrum_freq=fourier_frequencies(SampleRate, N);
% calculate filter gain for each spectrum frequency
g=filter_gain(spectrum_freq, Freq3db);
spectrum_filtered=spectrum.*g;
end
信号频谱图:
您可以向我们提供您正在使用的样本吗?也许你的结果?
—
penelope
我无法上传绘图图像(点数不足)并且无法将您链接到文件
—
user1825494
如果您在评论中添加链接,那么有人会很乐意对其进行编辑。如果您找到了一种将文件上传到某处并提供链接的方法,也请重新获取。
—
penelope
如果将图形绘制为对数-对数,则该图将提供更多信息。实际上,您似乎具有大约1.5 kHz至22.5 kHz的宽带噪声,而窄带音频大约为2 kHz。我假定的是“语音”信号,以及一个似乎很大的直流偏移,位于一个相当安静的“空洞”中。使用合适的带通滤波器进行隔离确实不那么困难。
—
戴夫特威德