%% Example of separating voices % Construct the data load handel y1=y; load laughter S=[y y1(1:52634)]; %Clean samples in the columns of S A =[ -0.5883 -0.1364; 2.1832 0.1139]; %Mixing Matrix X=S*A; % Mean subtract and plot the mixed signals. mX=mean(X); X=X-repmat(mX,52634,1); figure(1) plot(X(:,1),X(:,2),'.'); title('Mixed Signals'); %For comparison purposes, here’s the SVD [Ux,Sx,Vx]=svd(X,0); Y=X*Vx*diag(1./sqrt(diag(Sx))); figure(2) plot(Y(:,1),Y(:,2),'.'); title('KL Results') %Listen to the results: You’ll still hear mixtures fprintf('These are the original mixed signals\n'); %soundsc(X(:,1)); soundsc(X(:,2)); pause fprintf('This result is the first SVD\n'); soundsc(Y(:,1)); soundsc(Y(:,2)); fprintf('Press any key to continue\n'); pause dX=diff(X); [Y2,V,B,C,S3]=gsvd(X,dX,0); figure(3) plot(Y2(:,1),Y2(:,2),'.'); title('ICA Results'); %Listen to the results: They will be clean! fprintf('Cleaned signals\n'); soundsc(Y2(:,1)); soundsc(Y2(:,2));