Go to the source code of this file.
 | 
| int  | main (int argc, char *argv[]) | 
|   | 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char *  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 25 of file am-info.cc.
References ParseOptions::GetArg(), TransitionModel::GetPhones(), ParseOptions::NumArgs(), TransitionModel::NumPdfs(), TransitionModel::NumTransitionIds(), TransitionModel::NumTransitionStates(), ParseOptions::PrintUsage(), ParseOptions::Read(), TransitionModel::Read(), and Input::Stream().
   27     using namespace kaldi;
    31         "Write to standard output various properties of a model, of any type\n"    32         "(reads only the transition model)\n"    33         "Usage:  am-info [options] <model-in>\n"    41     if (po.NumArgs() != 1) {
    46     std::string model_in_filename = po.GetArg(1);
    51       Input ki(model_in_filename, &binary_read);
    52       trans_model.
Read(ki.Stream(), binary_read);
    55     std::cout << 
"number of phones " << trans_model.
GetPhones().size() << 
'\n';
    56     std::cout << 
"number of pdfs " << trans_model.
NumPdfs() << 
'\n';
    59     std::cout << 
"number of transition-states "    61   } 
catch(
const std::exception &e) {
    62     std::cerr << e.what() << 
'\n';
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
const std::vector< int32 > & GetPhones() const
Returns a sorted, unique list of phones. 
 
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
 
int32 NumTransitionIds() const
Returns the total number of transition-ids (note, these are one-based). 
 
void Read(std::istream &is, bool binary)
 
int32 NumTransitionStates() const
Returns the total number of transition-states (note, these are one-based).