blob: f89f4fd66c84f1269e3f6da37e5db7c70c8d927a (
plain) (
tree)
|
|
nerv.speech_utils = {}
function nerv.speech_utils.global_transf(feat_utter, global_transf,
frm_ext, frm_trim, gconf)
-- prepare for transf
local input = {feat_utter}
local output = {feat_utter:create()}
-- do transf
global_transf:init(input[1]:nrow())
global_transf:propagate(input, output)
-- trim frames
expanded = gconf.cumat_type(output[1]:nrow() - frm_trim * 2, output[1]:ncol())
expanded:copy_fromd(output[1], frm_trim, feat_utter:nrow() - frm_trim)
collectgarbage("collect")
return expanded
end
|