AddNoise - len = length(sp); ns = randn(1, len); %...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function nsp = AddNoise(sp, snr); %AddNoise.m created by Dr. Uche Abanulo; %Spring 2009 %inputs: %sp = Speech %SNR = signal to noise ratio in decibels (dB) % %output: %nsp = noisy speech with a signal to noise ratio of SNR dB % % Generate Additive White Guassian Noise (AWGN) - zero mean and unity variance)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: len = length(sp); ns = randn(1, len); % generating the noise signal ns = (ns - mean(ns))/std(ns);%standardizing the signal n %Scale noise sc_ns = (ns*max(sp))./(max(ns)*(10^(snr/10))); s %Generate Noisy speech nsp = sp + sc_ns';...
View Full Document

This note was uploaded on 09/04/2011 for the course ES 240 taught by Professor Dr,uche during the Spring '11 term at Montgomery College.

Ask a homework question - tutors are online