Adding White Gaussian noise to a voice signal I'm trying to add White Gaussian Noise to an audio file. However; the energy of the noise should be 1/10th of that of the signal. My first attempt is as following:

[y,Fs] = audioread('drum.wav');
%sound(y,Fs);
noisy_sig = addnoise(y,10);
sound(noisy_sig,Fs);

function noisy_sig = addnoise( sig , SNRdb )
   sig_power = norm(sig,2) / length(sig);
   % noise power is equal to sigma^2
   sigma2 = sig_power / 10^(SNRdb/10) ;
   noisy_sig = sig + sqrt(sigma2)*randn(size(sig));
end


When I listen the resulting wav, there is no difference between the original and noisy ones. Am I doing something wrong? Any help would be appreciated.
Your problem is how you calculate the signal power. You are calling norm which calculates $\sqrt{\sum_i |x_i|^2}$ but you want to calculate the sum of the squared values and then divide by the length as you do in your code. Try this instead:
sig_power = norm(sig)^2 / length(sig);. This line will calculate $\frac{1}{N}\sum_{i=1}^N |x_i|^2$.