Created
March 27, 2012 02:51
-
-
Save alculquicondor/2212064 to your computer and use it in GitHub Desktop.
Cocktail Party Problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir = strcat(pwd, "/"); | |
f1 = strcat(dir, input("audio 1: ","s")); | |
f2 = strcat(dir, input("audio 2: ","s")); | |
[y, FS, BPS] = wavread(f1); | |
[z, FS, BPS] = wavread(f2); | |
FS | |
%y = lin2mu(y(1:400000),0); | |
%z = lin2mu(z(1:400000),0); | |
y = lin2mu(y(1001:50000),0); | |
z = lin2mu(z(1001:50000),0); | |
x = [y, z]; | |
t = repmat(sum(x.*x,1),size(x,1),1).*x; | |
[W,s,v] = svd(t*x'); | |
x = W*x; | |
y = x(:, 1); | |
z = x(:, 2); | |
y = mu2lin(y,0); | |
z = mu2lin(z,0); | |
wavwrite(y, FS, BPS, "salida1.wav"); | |
wavwrite(z, FS, BPS, "salida2.wav") |
It will cause out of memory issue?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you explain the code ASAP