summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-30 15:27:01 +0800
committerDeterminant <[email protected]>2015-05-30 15:27:01 +0800
commit3b156cd0cd19aa7db97082161921064a0a871328 (patch)
treef58a2f25edbc5b3495756370fae6c33aab4f54c9 /examples
parent54546414d1700ed34bf2fe896f36e86e59850b63 (diff)
add nerv interface for TNet IO
Diffstat (limited to 'examples')
-rw-r--r--examples/tnet_io_example.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/tnet_io_example.lua b/examples/tnet_io_example.lua
new file mode 100644
index 0000000..eea73a5
--- /dev/null
+++ b/examples/tnet_io_example.lua
@@ -0,0 +1,16 @@
+require 'libspeech'
+frm_ext = 5
+feat_repo = nerv.TNetFeatureRepo(
+ "/slfs1/users/mfy43/swb_ivec/train_bp.scp",
+ "/slfs1/users/mfy43/swb_ivec/plp_0_d_a.conf",
+ frm_ext)
+lab_repo = nerv.TNetLabelRepo(
+ "/slfs1/users/mfy43/swb_ivec/ref.mlf",
+ "map",
+ "/slfs1/users/mfy43/swb_ivec/dict",
+ "*/",
+ "lab")
+feat_utter = feat_repo:cur_utter()
+print(feat_utter)
+lab_utter = lab_repo:get_utter(feat_repo, feat_utter:nrow() - frm_ext * 2)
+print(lab_utter)