Anda di halaman 1dari 9

BLIND AUDIO SOURCE

SEPARATION
Report of Improved Implementation

Group 6
Jayraj Dave: 131018
Kavi Pandya: 131020
Parth Patel: 131033
Shreedhar Dalal: 131052

Outline
1. Work done before Improved Implementation
2. Current Approach on Improved Implementation
2.1 Analysis on changing unmixing matrix estimate
2.2 Analysis on changing mixing Matrix
3. Matlab Code
4. References

1. Work done before Improved Implementation


We have gone through research papers [1], [2] for Blind Audio Source Separation.
So far, we have implemented the Blind Audio Source Separation approach
mentioned in paper [1] by Smaragdis, which further references to paper [2]- 'A New
Learning Algorithm for Blind Signal Separation'. The described algorithm in paper
[2] assumed instantaneous mixtures and uses the Matrix updating formula. The
Matrix updating algorithm mentioned in the same minimizes the statistical
dependency among outputs which are derived for the Blind separation of mixed
signal.
Flow of Dirty Implementation: The objective is to find the Unmixing Matrix which
can lead to separation of sources. For that,
We did take synthetic source signal (For the improved version we are taking
one source of human voice and another of a drum) and random mixing
matrix 'A' (Distributed within the interval [-1,1])
We then came to the only known parameter X = A*S
Approximation calculated of actual source matrix is Y = W*X. (Where W is
estimated inverse of 'A'-Mixing Matrix).
As given in paper [2], We are computing the best suitable unmixing matrix
for particular instant of 'Y' using the updating rule given in paper [2]. For each
time instance we keep updating unmixing matrix. This goes for 10 times for
all the time instances.
In dirty Implementation, we were able to recover one signal near to similar (but
slightly shifted) to the source signal. But other signals (2nd and 3rd) were not
similar (merely permutated version of original source signal).

2. Current Approach on Improved Implementation


In dirty implementation we worked with sources that were randomly generated. In
current work we are taking two non-random input source. One of the source is
human voice and another source is the sound of drum. We took these sources as
they have different frequency range which in turn reduces the complexity of source
separation.
We analysed two major changes:
A = mixing matrix
W = unmixing matrix estimate

2.1 Analysis on changing unmixing matrix estimate


We worked with 5 different values of W:
Value1 of W = [1 2 ; 2 1];
Value2 of W = [10 12 ; 13 11];
Value3 of W = [-0.4 1.4 ; 1.6 -0.6];
Value4 of W = [0.2 0.8 ; 0.6 0.4];
Value5 of W = rand(2,2);
We observed that different above values of W have no significant effect on the
unmixed signal. This is because at the end the convergence is giving us the nearby
values for final unmixing matrix. Hence, we state that the final value of W is not
greatly dependent on the initial estimate (taking into regard above five values).

2.2 Analysis on changing mixing Matrix


A is the mixing matrix which mixes the source. In our case it mixes source-1 :
Human Voice(Jayraj) and source-2 : sound of Drum. A determines the type and
the nature of mixtures. For the same we manipulated different value of A in order
to analyze the behaviour of our system/code when provided with varied mixtures.
Value1 of A = [0.3 0.7 ; 0.8 0.2];
Observation:
Unmixing sound 1 : Only drum sound

Unmixing sound 2 : Both Drum and Jayraj


Value2 of A =[0.4 0.6 ; 0.6 0.4];
Observation:
Unmixing sound 1 : Only drum sound
Unmixing sound 2 : Both Drum and Jayraj
Value3 of A =[0.1 0.9 ; 0.6 0.4];
Observation:
Unmixing sound 1 : Only drum sound
Unmixing sound 2 : Both Drum and Jayraj
Value4 of A =[25 50 ; 10 80];
Observation:
Unmixing sound 1 : Only drum sound
Unmixing sound 2 : Both Drum and Jayraj
Value5 of A =[0.2 340 ; 0.2 340];
Observation:
Unmixing sound 1 : Only Jayrajs voice
Unmixing sound 2 : Both Drum and Jayraj
Value6 of A =[0.1 100 ; 1 355];
Observation:
Unmixing sound 1 : Both Drum and Jayraj
Unmixing sound 2 : Both Drum and Jayraj
Value7 of A =[150 340 ; 200 480];
Observation:
Unmixing sound 1 : Both Drum and Jayraj
Unmixing sound 2 : Both Drum and Jayraj
Value8 of A = [0.3 133 ; 600 0.4];
Observation:
Unmixing sound 1 : Only Drum sound
Unmixing sound 2 : Only Jayrajs voice

Value9 of A = [133 0.3 ; 0.4 600];


Observation:
Unmixing sound 1: Only Jayrajs voice
Unmixing sound 2: Only Drum sound
From the above analysis of different values of A we found that in majority of cases
(6 out of 8 cases) we are clearly able to separate out one sound, either of Drum or
that of Jayraj. For some specific values of A (for the value8 and value9 of A) we
are able to separate out both Jayrajs voice and sound of Drum separately.
Let, A = [ j k ; m n] .
Case-1: Partial Separation
If j+k=1 and m+n=1,
Then we are clearly able to separate out/recover the sound of drum
Case-2 : Complete Separation
If k, m are very high and j, n are very low or if k, m are very low and j, n are very
high. Then we are clearly able to separate out/recover both Jayrajs voice and
sound of drum.
Hence, we see that the system works effectively in recovering at least one source
signal. And, in certain situations we are also capable of recovering both original
signals.
Thus, through this task on Improved Implementation we are able to identify the
constraints of our system for mixing matrix(A) and that of unmixing matrix
estimate(W). Through this implementation we are also able to show the cases in
which our system works perfectly and the cases in which it works partially.

3. Matlab Code
Part-1: Improved Implementation
%Group -6 : Blind audio souurce separation
clc;
clear all;
close all;
source=2;%number of source
W = [1 2 ; 2 1];%estimated unmixing matrix
[source1,fs_a] = wavread('Jayraj.wav');%read wave file of source1 and find
frequency
[source2,fs_b] = wavread('drum1.wav');%read wave file of source2 and find
frequency
%compare the length of both signal and assign it to signal1 and signal2
if length(source1)<length(source2)
signal1 = source1;
signal2 = source2(1:length(source1));%set length of source2 as length of
source1 and assign as signal2
else
signal1 = source1(1:length(source2));%set length of source1 as length of
source2 and assign as signal1
signal2 = source2;
end
S = [signal1 signal2];%source signal
S=S';
%different values of mixing matrix and output of it
% A = mixing matrix
%A = [0.3 0.7 ; 0.8 0.2];%drum separate
%A = [0.4 0.6 ; 0.6 0.4];%drum separate
%A = [0.1 0.9 ; 0.6 0.4];%drum separate
%A = [0.7 0.3 ; 0.9 0.1];%drum separate
%A = [3 5 ; 10 15];%drum separate
%A = [25 50 ; 10 80];%drum separate
%A = [0.1 100 ; 355 1];%drum destoration, jayraj - little clear with less
drum
%A = [0.2 340 ; 0.2 340];%jayraj separate
%A = [150 340 ; 200 480];%none separate
A = [0.3 133; 355 1];%both separate
%A = rand(2,2);
X = A*S;% mixture matrix
mixture1 = (X(1,:))';%first mixture of signal1 and signal2
mixture2 = (X(2,:))';%second mixture of signal1 and signal2

x = [mixture1 mixture2];%both mixture


x =x';
P = length(x);%set P as length of mixture
a=rand(source);%random matrix
mixes = x;%mixture signal
mx= mean(mixes');%mean of mixture signal
c=cov(mixes');%covariance matrix
wz=2*inv(sqrtm(c));% get decorrelating matrix
w=eye(2);% init. unmixing matrix, or w=rand(M,source);
M=size(w,2);% M=source usually
iteration=0;%define iteration
previousw=w;%hold the value of w
previousdelta=ones(1,source*source);%hold the value of delta
Id=eye(M);
%for multiple iteration:
learning_rate=0.0001; B=30; for I=1:20, func; end;
output=w*wz*mixes;% make unmixed sources
output1max = max(output(1,:));%output signal1
output2max = max(output(2,:));%output signal2
scaleoutput1 = (output(1,:)/output1max);%scale output signal1
scaleoutput2 = (output(2,:)/output2max);%scale output signal2
wavwrite(scaleoutput1,fs_b,'output_drum.wav');%write output wav file of drum1
wavwrite(scaleoutput2,fs_a,'output_jayraj.wav');%write output wav file of
jayraj

Part-2: function for updating matrix unmixing matrix


iteration=iteration+1;%iteration
t=1;
noblocks=fix(P/B);
BI=B*Id;
%calculating the value of w and upading it
for t=t:B:t-1+noblocks*B,
u=w*x(:,t:t+B-1);
w=w+learning_rate*(BI+(1-2*(1./(1+exp(-u))))*u')*w;
end;

4. References
1. Smaragdis, Paris. "Blind separation of convolved mixtures in the frequency
domain." Neurocomputing 22.1 (1998): 21-34.
2. Amari, Shun-ichi, Andrzej Cichocki, and Howard Hua Yang. "A new learning
algorithm for blind signal separation." Advances in neural information
processing systems (1996): 757-763.

Anda mungkin juga menyukai