Go to the source code of this file.
 | 
| int  | main (int argc, char *argv[]) | 
|   | 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char *  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 41 of file fstcopy.cc.
References SequentialTableReader< Holder >::Done(), ParseOptions::GetArg(), KALDI_LOG, SequentialTableReader< Holder >::Key(), SequentialTableReader< Holder >::Next(), ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), SequentialTableReader< Holder >::Value(), and TableWriter< Holder >::Write().
   43     using namespace kaldi;
    48         "Copy tables/archives of FSTs, indexed by a string (e.g. utterance-id)\n"    50         "Usage: fstcopy <fst-rspecifier> <fst-wspecifier>\n";
    56     if (po.NumArgs() != 2) {
    61     std::string fst_rspecifier = po.GetArg(1),
    62         fst_wspecifier = po.GetArg(2);
    68     for (; !fst_reader.Done(); fst_reader.Next(), n_done++)
    69       fst_writer.Write(fst_reader.Key(), fst_reader.Value());
    71     KALDI_LOG << 
"Copied " << n_done << 
" FSTs.";
    72     return (n_done != 0 ? 0 : 1);
    73   } 
catch(
const std::exception &e) {
    74     std::cerr << e.what();
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
 
A templated class for writing objects to an archive or script file; see The Table concept...
 
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
 
A templated class for reading objects sequentially from an archive or script file; see The Table conc...