diff options
Diffstat (limited to 'htk_io')
-rw-r--r-- | htk_io/init.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/htk_io/init.lua b/htk_io/init.lua index da91980..af92140 100644 --- a/htk_io/init.lua +++ b/htk_io/init.lua @@ -32,14 +32,15 @@ function TNetReader:get_data() -- read HTK 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, self.gconf) - - res[self.feat_id] = transformed + if self.global_transf ~= nil then + feat_utter = nerv.speech_utils.global_transf(feat_utter, + self.global_transf, self.frm_ext, self.gconf) + end + 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 |