Do not use on any
shared computer
August 21, 2008 04:42pm pdt
 
[x]
Attachment Details

Slow matlab code

Hi, can anybody help me to get this function faster ?
Think the matrix concatenation is the trouble? I also know that a double for i not good.
Takes 8-9 seconds for a 15 seconds sound file.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
function p=SDC(signal)
 
%functions to compute shifted delta cepstral from MFCC,PLP,LPC
%
%Signal is coeff of MFCC
 
%Author Tommy Strømhaug, 2008
 
%Hardcoded N, d, P, and k
 
%d and P considered in frames. N amd k is ints
N=7;  % number of c cepstral coefficients in each cepstral vector
d=1;  % time advance and delay for the delta computation
P=3;  % timeshift netween consecutive blocks
k=7;  % number of blocks whose delta coefficients are concatenated to form the SDC vector
 
[row,col]=size(signal);
sdc=[];
sdc_temp=[];
 
%Pad data to not get out of bound. circular padding
right=signal(:,col-9:col)
left =signal(:,1:21)
signal=cat(2,signal,left);
signal=cat(2,right,signal);
 
for t=11:col+10
        
    for i=0:k-1
        
        sdc_temp=signal(:,t+i*P+d)-signal(:,t+i*P-d);
        sdc=cat(2,sdc,sdc_temp);     
        
      end    
end
 
p=sdc;
Start your free trial to view this solution
Question Stats
Zone: Other
Question Asked By: Stromhau
Question Asked On: 07.23.2008
Participating Experts: 2
Points: 500
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by 936113311
Expert Comment by 936113311:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Stromhau
Author Comment by Stromhau:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by LukeyJay
Expert Comment by LukeyJay:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Stromhau
Author Comment by Stromhau:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by LukeyJay
Expert Comment by LukeyJay:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628