#include <kaldi-io.h>
Public Member Functions | |
Input (const std::string &rxfilename, bool *contents_binary=NULL) | |
The normal constructor. More... | |
Input () | |
bool | Open (const std::string &rxfilename, bool *contents_binary=NULL) |
bool | OpenTextMode (const std::string &rxfilename) |
bool | IsOpen () |
int32 | Close () |
std::istream & | Stream () |
~Input () | |
Private Member Functions | |
bool | OpenInternal (const std::string &rxfilename, bool file_binary, bool *contents_binary) |
KALDI_DISALLOW_COPY_AND_ASSIGN (Input) | |
Private Attributes | |
InputImplBase * | impl_ |
Definition at line 190 of file kaldi-io.h.
The normal constructor.
Opens the stream in binary mode. Equivalent to calling the default constructor followed by Open(); then, if binary != NULL, it calls ReadHeader(), putting the output in "binary"; it throws on error.
Definition at line 754 of file kaldi-io.cc.
References KALDI_ERR, Input::Open(), and kaldi::PrintableRxfilename().
|
inline |
Definition at line 198 of file kaldi-io.h.
References Output::Close(), Output::IsOpen(), Output::Open(), and Output::Stream().
~Input | ( | ) |
int32 Close | ( | ) |
Definition at line 761 of file kaldi-io.cc.
References InputImplBase::Close(), and Input::impl_.
Referenced by Nnet::Init(), LinearTransform::InitData(), Input::OpenInternal(), PdfPrior::PdfPrior(), Nnet::Read(), and Input::~Input().
|
inline |
Definition at line 34 of file kaldi-io-inl.h.
References Input::impl_.
Referenced by Input::OpenInternal(), and Input::Stream().
|
private |
Definition at line 26 of file kaldi-io-inl.h.
References Input::OpenInternal().
Referenced by Input::Input(), NnetDiscriminativeTrainer::NnetDiscriminativeTrainer(), NnetTrainer::NnetTrainer(), and kaldi::ReadScriptFile().
|
private |
Definition at line 772 of file kaldi-io.cc.
References kaldi::ClassifyRxfilename(), Input::Close(), Input::impl_, kaldi::InitKaldiInputStream(), Input::IsOpen(), KALDI_WARN, kaldi::kFileInput, kaldi::kOffsetFileInput, kaldi::kPipeInput, kaldi::kStandardInput, InputImplBase::MyType(), InputImplBase::Open(), kaldi::PrintableRxfilename(), and InputImplBase::Stream().
Referenced by Input::Open(), and Input::OpenTextMode().
|
inline |
Definition at line 30 of file kaldi-io-inl.h.
References Input::OpenInternal().
Referenced by PdfPrior::PdfPrior(), kaldi::ReadIntegerVectorSimple(), and kaldi::ReadIntegerVectorVectorSimple().
std::istream & Stream | ( | ) |
Definition at line 826 of file kaldi-io.cc.
References Input::impl_, Input::IsOpen(), KALDI_ERR, and InputImplBase::Stream().
Referenced by kaldi::BuildConstArpaLm(), kaldi::Compile(), CopyExcludedFeats(), CopyIncludedFeats(), kaldi::CopySubsetLattices(), kaldi::GetUtterancePairs(), Nnet::Init(), kaldi::InitAmGmmFromOld(), LinearTransform::InitData(), FixedAffineComponent::InitFromConfig(), FixedLinearComponent::InitFromString(), FixedAffineComponent::InitFromString(), main(), NnetChainTrainer::NnetChainTrainer(), NnetDiscriminativeTrainer::NnetDiscriminativeTrainer(), NnetTrainer::NnetTrainer(), OnlineGmmDecodingModels::OnlineGmmDecodingModels(), PdfPrior::PdfPrior(), kaldi::PrepareMap(), kaldi::nnet3::ProcessRangeFile(), Nnet::Read(), kaldi::ReadDecodeGraph(), fst::ReadFstKaldi(), fst::ReadFstKaldiGeneric(), kaldi::ReadIntegerVectorSimple(), kaldi::ReadIntegerVectorVectorSimple(), kaldi::ReadKaldiObject(), kaldi::ReadNetwork(), kaldi::ReadScriptFile(), kaldi::ReadSharedPhonesList(), kaldi::ReadSymbolList(), test_io(), TestAmDiagGmmAccsIO(), TestAmDiagGmmIO(), kaldi::TestBuildTreeStatsIo(), fst::TestContextFst(), kaldi::TestEventTypeIo(), kaldi::TestFmpe(), kaldi::TestGenRandContextDependency(), TestMllrAccsIO(), kaldi::TestSetOfNumbers(), TestSgmm2AccsIO(), TestSgmm2FmllrAccsIO(), TestSgmm2IO(), kaldi::UnitTestDiagGmm(), UnitTestEstimateDiagGmm(), UnitTestFullGmm(), kaldi::nnet2::UnitTestGenericComponentInternal(), kaldi::UnitTestIoNew(), kaldi::UnitTestIoPipe(), kaldi::UnitTestRangesMatrix(), kaldi::UnitTestRegtreeFmllrDiagGmm(), and WordBoundaryInfo::WordBoundaryInfo().
|
private |
Definition at line 235 of file kaldi-io.h.
Referenced by Input::Close(), Output::IsOpen(), Input::IsOpen(), Input::OpenInternal(), Input::Stream(), and Input::~Input().