31 bool binary = (
Rand() % 2 == 0);
32 std::vector<std::string> configs;
35 std::istringstream is(configs[0]);
38 std::ostringstream os;
39 nnet.
Write(os, binary);
40 const std::string &original_output = os.str();
41 std::istringstream nnet_is(original_output);
42 nnet.
Read(nnet_is, binary);
43 std::istringstream nnet_is2(original_output);
45 nnet2.
Read(nnet_is2, binary);
47 std::ostringstream os2, os3;
48 nnet.
Write(os2, binary);
50 nnet2.
Write(os3, binary);
62 using namespace kaldi;
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void Write(std::ostream &ostream, bool binary) const
void ReadConfig(std::istream &config_file)
This file contains various routines that are useful in test code.
void Read(std::istream &istream, bool binary)
int Rand(struct RandomState *state)
#define KALDI_ASSERT(cond)
void GenerateConfigSequence(const NnetGenerationOptions &opts, std::vector< std::string > *configs)
Generates a sequence of at least one config files, output as strings, where the first in the sequence...