From 09cb9dbf24be26ef064b3844a5a4b7ced8c8b02b Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 6 Aug 2015 11:25:34 +0800 Subject: let user decide whether do global_transf in the reader --- htk_io/init.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'htk_io') 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 -- cgit v1.2.3-70-g09d2