diff options
author | Determinant <[email protected]> | 2015-08-26 14:25:56 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-08-26 14:25:56 +0800 |
commit | 6495879e76dc0a2efe7b214b58d1d73a4ed3a931 (patch) | |
tree | 5ebabd090381b571615a9c7bc1d1e6eb43654a25 /kaldi_io/init.lua | |
parent | df4545867c32ff1b8e48317c04ea39503dbe0767 (diff) |
remove global_transf in IO modules; see asr_trainer.lua
Diffstat (limited to 'kaldi_io/init.lua')
-rw-r--r-- | kaldi_io/init.lua | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kaldi_io/init.lua b/kaldi_io/init.lua index a1496c4..930705e 100644 --- a/kaldi_io/init.lua +++ b/kaldi_io/init.lua @@ -6,7 +6,6 @@ function KaldiReader:__init(global_conf, reader_conf) self.feat_id = reader_conf.id self.frm_ext = reader_conf.frm_ext self.gconf = global_conf - self.global_transf = reader_conf.global_transf self.debug = global_conf.debug if self.debug == nil then self.debug = false @@ -39,28 +38,26 @@ function KaldiReader:get_data() -- read Kaldi feature local feat_utter = self.feat_repo:cur_utter(self.debug) -- global transf - local transformed = nerv.speech_utils.global_transf(feat_utter, - self.global_transf, self.frm_ext, 0, self.gconf) - res[self.feat_id] = transformed + res[self.feat_id] = feat_utter -- add corresponding labels for id, repo in pairs(self.lab_repo) do local lab_utter = repo:get_utter(self.feat_repo, - transformed:nrow(), + feat_utter:nrow(), self.debug) res[id] = lab_utter end -- add corresponding lookup features for id, repo in pairs(self.lookup_repo) do local lookup_utter = repo:get_utter(self.feat_repo, - transformed:nrow(), + feat_utter:nrow(), self.debug) local nrow = lookup_utter:nrow() - if nrow < transformed:nrow() then + if nrow < feat_utter:nrow() then -- repeat the last frame - local nlu = lookup_utter:create(transformed:nrow()) + local nlu = lookup_utter:create(feat_utter:nrow()) nlu:copy_from(lookup_utter, 0, nrow) row = nlu[nrow - 1] - for i = 0, transformed:nrow() - nrow - 1 do + for i = 0, feat_utter:nrow() - nrow - 1 do nlu:copy_from(nlu, nrow - 1, nrow, nrow + i) end lookup_utter = nlu |