Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion egs/mini_librispeech/s5/local/grammar/extend_vocab_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if [ $stage -le 4 ]; then
if $run_g2p; then
steps/dict/apply_g2p.sh $tree_dir/extvocab_nosp_lexicon/words $tree_dir/extvocab_nosp_g2p $tree_dir/extvocab_nosp_lexicon
else
cat <<EOF >$tree_dir/extvocab_nosp_lexicon//lexicon.lex
cat <<EOF >$tree_dir/extvocab_nosp_lexicon/lexicon.lex
HARDWIGG 0.962436 HH AA1 R D W IH1 G
SUDVESTR 0.162048 S AH1 D V EY1 S T R
SUDVESTR 0.133349 S AH1 D V EH1 S T R
Expand Down
5 changes: 2 additions & 3 deletions src/base/io-funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
#include <cctype>
#include <vector>
#include <string>

#include "base/kaldi-common.h"
#include "base/io-funcs-inl.h"

namespace kaldi {

Expand Down Expand Up @@ -235,7 +237,4 @@ inline void InitKaldiOutputStream(std::ostream &os, bool binary);
inline bool InitKaldiInputStream(std::istream &is, bool *binary);

} // end namespace kaldi.

#include "base/io-funcs-inl.h"

#endif // KALDI_BASE_IO_FUNCS_H_
1 change: 1 addition & 0 deletions src/bin/draw-tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// limitations under the License.

#include "tree/tree-renderer.h"
#include "tree/context-dep.h"

void MakeEvent(std::string &qry, fst::SymbolTable *phone_syms,
kaldi::EventType **query)
Expand Down
1 change: 1 addition & 0 deletions src/chainbin/chain-get-supervision.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "base/kaldi-common.h"
#include "util/common-utils.h"
#include "chain/chain-supervision.h"
#include "tree/context-dep.h"

namespace kaldi {
namespace chain {
Expand Down
3 changes: 1 addition & 2 deletions src/decoder/decodable-matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "base/kaldi-common.h"
#include "hmm/transition-model.h"
#include "itf/decodable-itf.h"
#include "matrix/kaldi-matrix.h"

namespace kaldi {

Expand Down Expand Up @@ -241,8 +242,6 @@ class DecodableMatrixScaled: public DecodableInterface {
BaseFloat scale_;
KALDI_DISALLOW_COPY_AND_ASSIGN(DecodableMatrixScaled);
};


} // namespace kaldi

#endif // KALDI_DECODER_DECODABLE_MATRIX_H_
2 changes: 1 addition & 1 deletion src/decoder/lattice-faster-online-decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class LatticeFasterOnlineDecoderTpl:

/// Outputs an FST corresponding to the single best path through the lattice.
/// This is quite efficient because it doesn't get the entire raw lattice and find
/// the best path through it; insterad, it uses the BestPathEnd and BestPathIterator
/// the best path through it; instead, it uses the BestPathEnd and BestPathIterator
/// so it basically traces it back through the lattice.
/// Returns true if result is nonempty (using the return status is deprecated,
/// it will become void). If "use_final_probs" is true AND we reached the
Expand Down
1 change: 1 addition & 0 deletions src/decoder/training-graph-compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "hmm/transition-model.h"
#include "fst/fstlib.h"
#include "fstext/fstext-lib.h"
#include "tree/context-dep.h"


namespace kaldi {
Expand Down
4 changes: 2 additions & 2 deletions src/doc/grammar.dox
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Z_S 243
that consume CLG.fst always also consume the <code>ilabel_info</code>, which is a <code>vector<vector<int32> ></code>.
For a particular ilabel, say 1536, <code>ilabel_info[1536] = { 5, 21 }</code> is a vector of integers representing
a phone-in-context. E.g. this would represent the phone 21 with a left-context of 5.
Disambiguation symbols also appear on the input of CLG.fst, and they are are represented in the <code>ilabel_info</code>
Disambiguation symbols also appear on the input of CLG.fst, and they are represented in the <code>ilabel_info</code>
a 1-dimensional vector like <code>{ -104 }</code> containing the negative of the disambiguation symbol's
integer id.

Expand All @@ -352,7 +352,7 @@ Z_S 243
The special symbols in CLG.fst will be as follows.

The following special symbols may appear in any CLG graph, top-level or not:
- When any graph invokes a sub-graph, there will ben arc with an ilabel
- When any graph invokes a sub-graph, there will be n arc with an ilabel
(</code>\#nonterm:foo</code>, <em>left-context-phone</em>) representing the
user-specified nonterminal and the actual left-context, which will be
followed by arcs with ilabels of the form (</code>\#nonterm_reenter</code>,
Expand Down
1 change: 1 addition & 0 deletions src/gmmbin/gmm-init-biphone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "util/common-utils.h"
#include "gmm/am-diag-gmm.h"
#include "tree/event-map.h"
#include "tree/context-dep.h"
#include "hmm/hmm-topology.h"
#include "hmm/transition-model.h"

Expand Down
1 change: 1 addition & 0 deletions src/gmmbin/gmm-init-mono.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "gmm/am-diag-gmm.h"
#include "hmm/hmm-topology.h"
#include "hmm/transition-model.h"
#include "tree/context-dep.h"

namespace kaldi {
// This function reads a file like:
Expand Down
1 change: 1 addition & 0 deletions src/hmm/hmm-test-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "hmm/hmm-topology.h"
#include "hmm/transition-model.h"
#include "lat/kaldi-lattice.h"
#include "tree/context-dep.h"

namespace kaldi {

Expand Down
1 change: 0 additions & 1 deletion src/hmm/hmm-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define KALDI_HMM_HMM_TOPOLOGY_H_

#include "base/kaldi-common.h"
#include "tree/context-dep.h"
#include "util/const-integer-set.h"


Expand Down
1 change: 0 additions & 1 deletion src/hmm/posterior.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#define KALDI_HMM_POSTERIOR_H_

#include "base/kaldi-common.h"
#include "tree/context-dep.h"
#include "util/const-integer-set.h"
#include "util/kaldi-table.h"
#include "hmm/transition-model.h"
Expand Down
3 changes: 2 additions & 1 deletion src/hmm/transition-model.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
#define KALDI_HMM_TRANSITION_MODEL_H_

#include "base/kaldi-common.h"
#include "tree/context-dep.h"
#include "util/const-integer-set.h"
#include "fst/fst-decl.h" // forward declarations.
#include "hmm/hmm-topology.h"
#include "itf/options-itf.h"
#include "itf/context-dep-itf.h"
#include "matrix/kaldi-vector.h"

namespace kaldi {

Expand Down
1 change: 0 additions & 1 deletion src/lat/minimize-lattice.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "base/kaldi-common.h"
#include "util/common-utils.h"
#include "fstext/fstext-lib.h"
#include "hmm/transition-model.h"
#include "lat/kaldi-lattice.h"

namespace fst {
Expand Down
1 change: 0 additions & 1 deletion src/lat/push-lattice.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "base/kaldi-common.h"
#include "util/common-utils.h"
#include "fstext/fstext-lib.h"
#include "hmm/transition-model.h"
#include "lat/kaldi-lattice.h"

namespace fst {
Expand Down
8 changes: 4 additions & 4 deletions src/matrix/kaldi-blas.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@

#ifdef HAVE_ATLAS
extern "C" {
#include <cblas.h>
#include <clapack.h>
#include "cblas.h"
#include "clapack.h"
}
#elif defined(HAVE_CLAPACK)
#ifdef __APPLE__
Expand All @@ -74,7 +74,7 @@
// from the tools/CLAPACK_include directory.
#include <cblas.h>
#include <f2c.h>
#include <clapack.h>
#include <clapack.h>

// get rid of macros from f2c.h -- these are dangerous.
#undef abs
Expand Down Expand Up @@ -110,7 +110,7 @@
#undef bit_clear
#undef bit_set
#else
#error "You need to define (using the preprocessor) either HAVE_CLAPACK or HAVE_ATLAS or HAVE_MKL (but not more than one)"
#error "You need to define (using the preprocessor) either HAVE_CLAPACK or HAVE_ATLAS or HAVE_MKL (but not more than one)"
#endif

#ifdef HAVE_OPENBLAS
Expand Down
14 changes: 8 additions & 6 deletions src/online2/online-gmm-decodable.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
#define KALDI_ONLINE2_ONLINE_GMM_DECODABLE_H_

#include "itf/online-feature-itf.h"
#include "gmm/decodable-am-diag-gmm.h"
#include "matrix/matrix-lib.h"
#include "itf/decodable-itf.h"
#include "gmm/am-diag-gmm.h"
#include "hmm/transition-model.h"

namespace kaldi {

Expand All @@ -37,20 +39,20 @@ class DecodableDiagGmmScaledOnline : public DecodableInterface {
const BaseFloat scale,
OnlineFeatureInterface *input_feats);


/// Returns the scaled log likelihood
virtual BaseFloat LogLikelihood(int32 frame, int32 index);

virtual bool IsLastFrame(int32 frame) const;

virtual int32 NumFramesReady() const;
virtual int32 NumFramesReady() const;

/// Indices are one-based! This is for compatibility with OpenFst.
virtual int32 NumIndices() const { return trans_model_.NumTransitionIds(); }

private:
void CacheFrame(int32 frame);

OnlineFeatureInterface *features_;
const AmDiagGmm &ac_model_;
BaseFloat ac_scale_;
Expand Down
2 changes: 1 addition & 1 deletion src/online2/online-speex-wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// limitations under the License.

#include <cstring>
#include "online-speex-wrapper.h"
#include "online2/online-speex-wrapper.h"

namespace kaldi {

Expand Down
2 changes: 1 addition & 1 deletion src/online2/onlinebin-util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.

#include "onlinebin-util.h"
#include "online2/onlinebin-util.h"

namespace kaldi {

Expand Down
2 changes: 2 additions & 0 deletions src/tree/tree-renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "tree/tree-renderer.h"

#include "tree/context-dep.h"

namespace kaldi {
const int32 TreeRenderer::kEdgeWidth = 1;
const int32 TreeRenderer::kEdgeWidthQuery = 3;
Expand Down
1 change: 0 additions & 1 deletion src/tree/tree-renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "base/kaldi-common.h"
#include "tree/event-map.h"
#include "util/common-utils.h"
#include "hmm/transition-model.h"
#include "fst/fstlib.h"

namespace kaldi {
Expand Down