diff options
Diffstat (limited to 'kaldi_io')
-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 |