Re: VOICE SCRAMBLING in matlab USING FILTERING AND MODULATI
fs=8000;
inp_samples = wavread('speech_sample_8bits.wav');
N_samples = length(inp_samples);
%filter_coefficients
H = [-0.180866787852 0.1627384090595 0.02414460149792 -0.03956189153684 0.6444243068351 0.6444243068351 -0.03956189153684 0.02414460149792 0.1627384090595 -0.180866787852];
N=length(H);
X = zeros(1,N);
M = zeros(1,N);
%H = zeros(1,N);
%H(1:N)= filter_coefs(1:N);
t=0
1/fs):1;
sin_sample = sin(2*pi*3300*t);%sine_wave samples 3.3khz
m = 1;
for i=1:N_samples
X(2:N) = X(1:N-1);
X(1) = inp_samples(i);
y(i) = X * H';%filter output(lowpass 3khz)
op_mul(i)= y(i) * sin_sample(m);%multiplier_output
m=m+1;
if (m==8002)
m = 1;
end
M(2:N) = M(1:N-1);
M(1) = op_mul(i);
op_sample(i) = M * H';%filter output(lowpass 3khz)
end
inp_samples = wavread('speech_sample_8bits.wav');
a=wavread('speech_sample_8bits.wav');
plot(a);
wavwrite(op_sample,'scarmbler_output.wav');