12
$\begingroup$

I have written a program to perform FastICA on a stereo WAV file using the code on Python MDP FastICA Example

With the audio examples I get very good results.

Then I try to do real world recording using two computer mono microphones connected to the stereo mic in of my pc by connecting mic 1 to L channel and mic 2 to R channel. I test by playing some music at the background while I am talking in a quiet room.

However, running FastICA does not separate the signals at all. Is it possible that the quality of microphones is too poor? Do I need to do anything to the recorded WAV file (16 bits, signed PCM, 44100Hz) before running FastICA?

You can download the recording here.

$\endgroup$

3 Answers 3

11
$\begingroup$

ICA in raw form is only suitable for use with phase synchronised observation mixtures. Using microphones as you have described will introduce a phase delay as pointed out by other posters. However this phase delay can be used to great avail. The best known algorithm that deals with stereo separation in the presence of delays is DUET. The links are broken but the references you are looking for are here >http://eleceng.ucd.ie/~srickard/bss.html.

This is the paper you should look for >
A. Jourjine, S. Rickard, and O. Yilmaz, Blind Separation of Disjoint Orthogonal Signals: Demixing N Sources from 2 Mixtures, IEEE Conference on Acoustics, Speech, and Signal Processing (ICASSP2000), Volume 5, Pages 2985-2988, Istanbul, Turkey, June 2000

$\endgroup$
9
  • 2
    $\begingroup$ A question - if the mixes are coming from more than one spatially separate mic... then how can we ever have phase synchronicity?... In all the texts I see this example of multiple mics is used ubiquitously, but if the phase synchronicity is such an issue why is it not mentioned? Im just trying to understand here, I am new to the ICA scene. $\endgroup$
    – Spacey
    Commented Dec 6, 2011 at 16:09
  • $\begingroup$ @Mohammad: I suspect the phase synchronicity is present in other applications, and they just use audio applications to make it more familiar to readers. $\endgroup$
    – endolith
    Commented Dec 6, 2011 at 20:10
  • 1
    $\begingroup$ @Mohammad it is possible with spaced microphones to have phase sychronicity for one source. Imagine a source being captured with 2 microphones placed equidistant on either side of the source. The path length from source to microphone is the same in each case and the signals will be recieved in a phase at both mics, but only for that source. You can add more mics equidistantly along different spatial dimensions to further reject unwanted signals. Some EEG analysis techniques avail of this. You should also note that phase delay between each mic will be a function of frequency (due to wavelength) $\endgroup$
    – Dan Barry
    Commented Dec 7, 2011 at 11:54
  • $\begingroup$ @DanBarry Thanks Dan - interesting point about the EEG. Let me just clarify - I of course obviously know that if sensors are equidistant from a source we get the same delay... :-) What I was trying to get at was for applications where such things cannot be controlled, (speakers in a room with a number of sensors), ICA is said to work in such cases - but 99% of the time we wont have phase synchronicity - if it is touted as a working algorithm in this case - yet is sensitive to those phases issues - then what is missing here?... Thanks! $\endgroup$
    – Spacey
    Commented Dec 8, 2011 at 17:01
  • 1
    $\begingroup$ @endolith yes it was a nice solution and it works! I also thought of a similar solution back in 2003 and was disappointed to find something similar but mine was sufficiently different that I managed to patent it. I was luckily able to be the first to develop a realtime source separation algorithm back in 2004. Demos of the original here > audioresearchgroup.com/main.php?page=Demos and the new improved one can be seen in action in the video demo here > riffstation.com $\endgroup$
    – Dan Barry
    Commented Dec 13, 2011 at 12:46
6
$\begingroup$

As I say further down the page:

it turns out that ICA doesn’t actually work well when the signals occur at different delays in the different sensor channels; it assumes instantaneous mixing (that the signals are in perfect sync with each other in all the different recordings). Delay would happen in a real-life situation with performers and microphones, since each source is a different distance from each microphone.

I'd guess that this delay between channels is the reason. If you look closely at the two waves, you will probably see that some sounds occur sooner in one channel than the other, and the rest vice versa.

To prove that it's not the quality of the microphones, you could try recording two different signals using one microphone at different times, and then mix them together so that some of each signal is in each channel, and see if the ICA works in that case.

$\endgroup$
13
  • $\begingroup$ I've tried. It's should be a delay problem as you suggest. By mixing separate recordings FastICA produces almost perfect results. I need to find some ways to cope with the delay.... $\endgroup$
    – Jeremy
    Commented Dec 4, 2011 at 15:54
  • $\begingroup$ @Jeremy: I think you would need a different algorithm, then. $\endgroup$
    – endolith
    Commented Dec 5, 2011 at 3:02
  • $\begingroup$ do you know any bss algo that can cope with delay? $\endgroup$
    – Jeremy
    Commented Dec 5, 2011 at 14:53
  • $\begingroup$ actually when I record and clap my hand to produce a loud sharp noise, I cannot notice any delay in audacity. $\endgroup$
    – Jeremy
    Commented Dec 5, 2011 at 14:55
  • 1
    $\begingroup$ @endolith You might be right - some new information - I checked the footnotes, and apparently the author of my book does say that he assumes all signals are not delayed relative to each other. :-/ In other words the mixing matrix is simply one that changes amplitudes. Eh. Now its even more confusing. :-) $\endgroup$
    – Spacey
    Commented Dec 12, 2011 at 18:49
0
$\begingroup$

There is another algorithm which uses second order statistics: AMUSE.

Here you can find an implementation in Python.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.