kaldi-io-inl.h
Go to the documentation of this file.
1 // util/kaldi-io-inl.h
2 
3 // Copyright 2009-2011 Microsoft Corporation
4 
5 // See ../../COPYING for clarification regarding multiple authors
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 
11 // http://www.apache.org/licenses/LICENSE-2.0
12 
13 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16 // MERCHANTABLITY OR NON-INFRINGEMENT.
17 // See the Apache 2 License for the specific language governing permissions and
18 // limitations under the License.
19 #ifndef KALDI_UTIL_KALDI_IO_INL_H_
20 #define KALDI_UTIL_KALDI_IO_INL_H_
21 
22 #include<string>
23 
24 namespace kaldi {
25 
26 bool Input::Open(const std::string &rxfilename, bool *binary) {
27  return OpenInternal(rxfilename, true, binary);
28 }
29 
30 bool Input::OpenTextMode(const std::string &rxfilename) {
31  return OpenInternal(rxfilename, false, NULL);
32 }
33 
34 bool Input::IsOpen() {
35  return impl_ != NULL;
36 }
37 
39  return impl_ != NULL;
40 }
41 
42 
43 } // end namespace kaldi.
44 
45 
46 #endif // KALDI_UTIL_KALDI_IO_INL_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
bool IsOpen()
Definition: kaldi-io-inl.h:34
InputImplBase * impl_
Definition: kaldi-io.h:235
bool Open(const std::string &rxfilename, bool *contents_binary=NULL)
Definition: kaldi-io-inl.h:26
bool OpenTextMode(const std::string &rxfilename)
Definition: kaldi-io-inl.h:30
bool OpenInternal(const std::string &rxfilename, bool file_binary, bool *contents_binary)
Definition: kaldi-io.cc:772