如何在Matlab上用FastICA分离不同的声源?

如何在Matlab上用FastICA分离不同的声源?,matlab,Matlab,我必须从两个不同的麦克风上录制两个wave文件,在采访中录制 我需要分离声音,找到两个原始声源:一个文件只有女人的声音,另一个文件只有男人的声音。 (我希望在此处显示相同的结果:) 我在同一个网站上下载了Matlab的FastICA软件包:research.ics.aalto.fi/ica/FastICA/code/dlcode.shtml 这是我的代码,用于将两个声音分开,最后得到两个wave文件 % Extract wave files [Y, FS, BPS] = wavread('inp

我必须从两个不同的麦克风上录制两个wave文件,在采访中录制

我需要分离声音,找到两个原始声源:一个文件只有女人的声音,另一个文件只有男人的声音。 (我希望在此处显示相同的结果:)

我在同一个网站上下载了Matlab的FastICA软件包:research.ics.aalto.fi/ica/FastICA/code/dlcode.shtml

这是我的代码,用于将两个声音分开,最后得到两个wave文件

% Extract wave files
[Y, FS, BPS] = wavread('input_A.wav');
[Z, FS, BPS] = wavread('input_B.wav');

Y = Y';
Z = Z';

% Create the matrix with the two different channels
X = [Y; Z];

% Display the two input signals
figure('Name', 'Input Y Z');
subplot(2, 1, 1); plot(X(1, :));
subplot(2, 1, 2); plot(X(2, :));

% Run the algorithm
[S, A, W] = fastica(X);

% Display the two output signals
figure('Name', 'Sources');
subplot(2, 1, 1); plot(S(1, :));
subplot(2, 1, 2); plot(S(2, :));

% Extract the two sources
Y = S(1, :);
Z = S(2, :);

% Write wave files
wavwrite(Y, FS, BPS, 'output_1.wav');
wavwrite(Z, FS, BPS, 'output_2.wav');
以下是算法的输出:

> Number of signals: 2.
> Number of samples: 480000.
> Calculating covariance...
> Dimension not reduced.
> Selected [ 2 ] dimensions.
> Smallest remaining (non-zero) eigenvalue [ 0.000693973 ].
> Largest remaining (non-zero) eigenvalue [ 0.00107027 ].
> Sum of removed eigenvalues [ 0 ].
> [ 100 ] % of (non-zero) eigenvalues retained.
> Whitening...
> Check: covariance differs from identity by [ 8.88178e-16 ].
> Used approach [ defl ].
> Used nonlinearity [ pow3 ].
> Warning: Data vectors are very long. Plotting may take long time.
> Starting ICA calculation...
> IC 1 .....computed ( 5 steps ).
> IC 2 ..computed ( 2 steps ).
> Done.
> Adding the mean back to the data.
是否显示以下信号:

我真的不明白为什么这些图上的输出信号和输入信号几乎一样为什么声音没有分开?


提前感谢所有读过这篇文章并试图回答它的人

我猜是因为ICA是一种神奇的工具,只有ICA专家才能使用。;-)这就是我的印象。如果您在这里没有得到答案,请将问题移至dsp.SE。您是否尝试了ics.aalto网站上的示例,以确保您的代码是正确的?你能上传你的混合wav文件吗?