i've wrote the code to produced 13th coefficient of mel-frequency data, but im not really know how to use it in neural network? This my code that i just wrote:
load fik_1; %getting the data from directory
fs = 11025; %frequency sampling
precoeff = -0.9; %Pre-Emphasis the data signal
x = [fik_1(1)*(1+precoeff);fik_1(2:end)+precoeff*fik_1(1:end-1)];
wavplay(x,fs);
w = 'm'; %Window type's :hamming
nc = 13; % No. of coefficient 13th
p = floor(3*log(fs)); %No. of filters in filterbank
n = pow2(floor(log2(0.03*fs))) %Lenght of frame in samples = 256
inc = n/2; %frame increment (default n/2)
fl = 0; %low end of the lowest filter as a fraction of fs (default = 0)
fh = 0.5; %high end of highest filter as a fraction of fs (default = 0.5)
c=melcepst(x,fs,w,nc); %apply MFCC function to get 13th coefficient
[r,p] = corrcoef(c)
Target would be the data set which is actual, desired, taken from the system for particular known signal and input P is arbitrary input data set which is taken at run time (current signal)
fikrul said:
if my P the input which are my 13coefficient, what is going to be for my T(target)..??
You need to take same set of 13 coefficient for the signal which is need to be identified (actual signal)
Let say, your target is to identify signal \[s1\] then you need to obtain data set for \[s1\] assume your T is [0 1 2 3 4 3 2 1 2 3 4]; and need to store in memory (something called dictionary)
Now input another arbitrary signal, let say [tex:d102efd4b3]s2[/tex:d102efd4b3] to the system and obtain P = [0 1 2 3 4 5 6 7 8 9 10]; (called current print)
So for a network is created with one hidden layer of five neurons.
Code:
net = newff(P,T,5);
The network is simulated and its output plotted against the targets.
Code:
Y = sim(net,P);
plot(P,T,P,Y,'o')
The network is trained for 50 epochs. Again the network's output is plotted.
Code:
net.trainParam.epochs = 50;
net = train(net,P,T);
Y = sim(net,P);
plot(P,T,P,Y,'o')
**broken link removed**
In the article it is described as below
Code:
net=newff(minmax( X (n) MFCC ),[13 4],{'tansig''tansig'},'trainlm');
[net,tr]= train( X (n) MFCC ,T);
fs = 11025; %frequency sampling
s = wavrecord(2*fs,fs);
precoeff = -0.9; %Pre-Emphasis the data signal
x = [s(1)*(1+precoeff);s(2:end)+precoeff*s(1:end-1)];
wavplay(x,fs);
w = 'm'; %Window type's :hamming
nc = 13; % No. of coefficient 13th
p = floor(3*log(fs)); %No. of filters in filterbank
n = pow2(floor(log2(0.03*fs))) %Lenght of frame in samples = 256
inc = n/2; %frame increment (default n/2)
fl = 0; %low end of the lowest filter as a fraction of fs (default = 0)
fh = 0.5; %high end of highest filter as a fraction of fs (default = 0.5)
c=melcepst(x,fs,w,nc,inc); %apply MFCC function to get 13th coefficient
c=cov(c);
%save c;
load c3;
P = c;
T = c3;
net=newff( P,T,[],{'tansig''tansig'},'trainlm');
net= train(net, P ,T);
%net=newff( P,T,[],{'tansig''tansig'},'trainlm');
%net= train(net, P ,T);
net = newff(P,T,5); %Here a network is created with one hidden layer of five neurons.
net.trainParam.epochs = 50;
net = train(net,P,T);
In a similar program of mine matrices w1,w2,w3 contains the MFCC for 3 speakers which are of dimension (100x10) where 100 represents the number of frames and 10 is the number of MFCC coefficients. Now how am i going to define the neural network and train it with all the three MFCC matrix? Please help me..