summaryrefslogtreecommitdiff
path: root/htk_io
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-08-06 11:25:34 +0800
committerDeterminant <[email protected]>2015-08-06 11:25:34 +0800
commit09cb9dbf24be26ef064b3844a5a4b7ced8c8b02b (patch)
tree018f6d1cd473df3c40a59aefea9b1585c960ac4e /htk_io
parentc6c644223dc9168befd189bf6f33243390671c99 (diff)
let user decide whether do global_transf in the reader
Diffstat (limited to 'htk_io')
-rw-r--r--htk_io/init.lua11
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