summaryrefslogtreecommitdiff
path: root/tnet_io/KaldiLib
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-21 22:58:50 +0800
committerDeterminant <[email protected]>2015-06-21 22:58:50 +0800
commit331886e5995ba3ece4ae97f199b5d7ceea612080 (patch)
treeee1aeae37b7083494b03bf46089a9f800f5dacf1 /tnet_io/KaldiLib
parentaee0d372e6b06a217f24bea5c88962b97e0ca0eb (diff)
add support: use -1 to denote the end of utterance in MLF
Diffstat (limited to 'tnet_io/KaldiLib')
-rw-r--r--tnet_io/KaldiLib/Labels.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tnet_io/KaldiLib/Labels.cc b/tnet_io/KaldiLib/Labels.cc
index 1af4447..8b04cde 100644
--- a/tnet_io/KaldiLib/Labels.cc
+++ b/tnet_io/KaldiLib/Labels.cc
@@ -372,7 +372,10 @@ namespace TNet {
//divide beg/end by sourceRate and round up to get interval of frames
beg = (beg+sourceRate/2)/sourceRate;
- end = (end+sourceRate/2)/sourceRate;
+ if (end == (unsigned long long)-1)
+ end = rDesired[prev].Rows();
+ else
+ end = (end+sourceRate/2)/sourceRate;
//beg = (int)round(beg / (double)sourceRate);
//end = (int)round(end / (double)sourceRate);