20 #ifndef KALDI_UTIL_KALDI_IO_H_ 21 #define KALDI_UTIL_KALDI_IO_H_ 129 Output(
const std::string &filename,
bool binary,
bool write_header =
true);
140 bool Open(
const std::string &wxfilename,
bool binary,
bool write_header);
196 Input(
const std::string &rxfilename,
bool *contents_binary = NULL);
209 inline bool Open(
const std::string &rxfilename,
bool *contents_binary = NULL);
214 inline bool OpenTextMode(
const std::string &rxfilename);
233 bool OpenInternal(
const std::string &rxfilename,
bool file_binary,
234 bool *contents_binary);
242 Input ki(filename, &binary_in);
243 c->Read(ki.
Stream(), binary_in);
258 const std::string &filename,
260 Output ko(filename, binary);
261 c.Write(ko.
Stream(), binary);
280 #endif // KALDI_UTIL_KALDI_IO_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
InputType ClassifyRxfilename(const std::string &filename)
ClassifyRxfilenames interprets filenames for reading as follows:
A class for storing matrices.
void ReadKaldiObject(const std::string &filename, Matrix< float > *m)
KALDI_DISALLOW_COPY_AND_ASSIGN(Output)
bool Open(const std::string &wxfilename, bool binary, bool write_header)
This opens the stream, with the given mode (binary or text).
OutputType ClassifyWxfilename(const std::string &filename)
ClassifyWxfilename interprets filenames as follows:
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)
std::string PrintableRxfilename(const std::string &rxfilename)
PrintableRxfilename turns the rxfilename into a more human-readable form for error reporting...
std::string PrintableWxfilename(const std::string &wxfilename)
PrintableWxfilename turns the wxfilename into a more human-readable form for error reporting...