From 9e1a0931be43ea80fe7d41154007839b637d4e08 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 27 Aug 2015 17:20:34 +0800 Subject: add frm expand and trim in kaldi_io --- htk_io/init.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'htk_io') diff --git a/htk_io/init.lua b/htk_io/init.lua index abaa794..b360b67 100644 --- a/htk_io/init.lua +++ b/htk_io/init.lua @@ -14,12 +14,14 @@ function TNetReader:__init(global_conf, reader_conf) reader_conf.conf_file, reader_conf.frm_ext) self.lab_repo = {} - for id, mlf_spec in pairs(reader_conf.mlfs) do - self.lab_repo[id] = nerv.TNetLabelRepo(mlf_spec.file, - mlf_spec.format, - mlf_spec.format_arg, - mlf_spec.dir, - mlf_spec.ext) + if reader_conf.mlfs then + for id, mlf_spec in pairs(reader_conf.mlfs) do + self.lab_repo[id] = nerv.TNetLabelRepo(mlf_spec.file, + mlf_spec.format, + mlf_spec.format_arg, + mlf_spec.dir, + mlf_spec.ext) + end end end -- cgit v1.2.3-70-g09d2