model-test-common.h
Go to the documentation of this file.
1 // gmm/model-test-common.h
2 
3 // Copyright 2009-2011 Saarland University
4 // Author: Arnab Ghoshal
5 
6 // See ../../COPYING for clarification regarding multiple authors
7 //
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 //
12 // http://www.apache.org/licenses/LICENSE-2.0
13 //
14 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
16 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
17 // MERCHANTABLITY OR NON-INFRINGEMENT.
18 // See the Apache 2 License for the specific language governing permissions and
19 // limitations under the License.
20 
21 
22 #ifndef KALDI_GMM_MODEL_TEST_COMMON_H_
23 #define KALDI_GMM_MODEL_TEST_COMMON_H_
24 
25 #include "gmm/diag-gmm.h"
26 #include "gmm/full-gmm.h"
27 
28 namespace kaldi {
29 namespace unittest {
30 
31 void RandPosdefSpMatrix(int32 dim, SpMatrix<BaseFloat> *matrix,
32  TpMatrix<BaseFloat> *matrix_sqrt = NULL,
33  BaseFloat *logdet = NULL);
34 void RandDiagGaussFeatures(int32 num_samples,
35  const VectorBase<BaseFloat> &mean,
36  const VectorBase<BaseFloat> &sqrt_var,
37  MatrixBase<BaseFloat> *feats);
38 void RandFullGaussFeatures(int32 num_samples,
39  const VectorBase<BaseFloat> &mean,
40  const TpMatrix<BaseFloat> &sqrt_var,
41  MatrixBase<BaseFloat> *feats);
42 void InitRandDiagGmm(int32 dim, int32 num_comp, DiagGmm *gmm);
43 void InitRandFullGmm(int32 dim, int32 num_comp, FullGmm *gmm);
44 
45 } // End namespace unittest
46 } // End namespace kaldi
47 
48 
49 #endif // KALDI_GMM_MODEL_TEST_COMMON_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
void RandPosdefSpMatrix(int32 dim, SpMatrix< BaseFloat > *matrix, TpMatrix< BaseFloat > *matrix_sqrt, BaseFloat *logdet)
void RandFullGaussFeatures(int32 num_samples, const VectorBase< BaseFloat > &mean, const TpMatrix< BaseFloat > &sqrt_var, MatrixBase< BaseFloat > *feats)
float BaseFloat
Definition: kaldi-types.h:29
void InitRandDiagGmm(int32 dim, int32 num_comp, DiagGmm *gmm)
void InitRandFullGmm(int32 dim, int32 num_comp, FullGmm *gmm)
void RandDiagGaussFeatures(int32 num_samples, const VectorBase< BaseFloat > &mean, const VectorBase< BaseFloat > &sqrt_var, MatrixBase< BaseFloat > *feats)