Addition of noise to speech

MATLAB CODE:

clc;
close all;
clear all;

[Data,fs,nbits]=audioread(‘speechfilename.wav’);  % input wav file
Data=Data(:,1);
NoiseData=Data+0.05*randn(size(Data));  %defining Noise data
wavplay(NoiseData,fs);
X=fft(Data);      %FFT of data file
X=abs(X);
subplot(2,1,1);
plot(X);
grid on;
y=fft(NoiseData);   %FFT of noise in data
Y=abs(Y);
subplot(2,1,1);
plot(Y);
audiowrite(filename,Y,fs);    %filename= output file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: