From 331886e5995ba3ece4ae97f199b5d7ceea612080 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sun, 21 Jun 2015 22:58:50 +0800 Subject: add support: use -1 to denote the end of utterance in MLF --- tnet_io/KaldiLib/Labels.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tnet_io/KaldiLib') 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); -- cgit v1.2.3-70-g09d2