[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:02935] Hi



Hi, all
I read the parameter generation file "HGen.c" recently and puzzled by the calculation of  W'*U^{-1}*M and W'*U^{-1}*W *,
in line 1133 of "HGen.c", in the function :" static void Calc_WUM_and_WUW (PdfStream *pst, const int bias)"
the calculation of  W'*U^{-1}*M  is as following,

/* computation */
   #pragma omp parallel for private(m,n,d,j,l,cov,WU,k)
   for (t=1; t<=pst->T; t++) {
      for (m=1; m<=M; m++) {
         for (n=1; n<=M; n++) {
            for (d=0; d<pst->win.num; d++) {
               for (j=pst->win.maxw[WLEFT]; j<=pst->win.maxw[WRIGHT]; j++) {
                  if ((t+j>0) && (t+j<=pst->T)) {
                     /* accumulate W'*U^{-1}*M */
                     if ((n==1) && (pst->win.width[d][WLEFT]<=j) && (j<=pst->win.width[d][WRIGHT]) && (pst->win.coef[d][-j]!=0.0))
                        pst->WUM[M*(t-1)+m] += ((double)pst->win.coef[d][-j]) * pst->mseq[t+j][d*pst->order+m+bias];
                        
ignoring the dimension of the mcep, window matrix W is a 3T*T matrix, so W' is a T*3T matrix.                                              
matrix W:                        
1    0    0    0    0    0
0    0    0    0    0    0
0    0    0    0    0    0
--------------------------
0    1    0    0    0    0
-0.5 0    0.5  0    0    0
1    -2   1    0    0    0
--------------------------
0    0    1    0    0    0
0    -0.5 0    0.5  0    0
0    1    -2   1    0    0
--------------------------
        ...
        ...
        
in line 1133, pst->mseq[t+j][d*pst->order+m+bias] means the (t+j)'s element value of U^{-1}*M, however, I think ((double)pst->win.coef[d][-j]) refers to the d's rows of part of W, not W'.
anybody could help me to figure it out?

Regards,
FLY