|
|
@ -136,14 +136,16 @@ int main(int argc, char* argv[]) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
std::string result;
|
|
|
|
std::string result;
|
|
|
|
result = decoder.GetFinalBestPath();
|
|
|
|
result = decoder.GetFinalBestPath();
|
|
|
|
KALDI_LOG << " the result of " << utt << " is " << result;
|
|
|
|
decodable->Reset();
|
|
|
|
|
|
|
|
decoder.Reset();
|
|
|
|
if (result.empty()) {
|
|
|
|
if (result.empty()) {
|
|
|
|
// the TokenWriter can not write empty string.
|
|
|
|
// the TokenWriter can not write empty string.
|
|
|
|
result = " ";
|
|
|
|
++num_err;
|
|
|
|
|
|
|
|
KALDI_LOG << " the result of " << utt << " is empty";
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
KALDI_LOG << " the result of " << utt << " is " << result;
|
|
|
|
result_writer.Write(utt, result);
|
|
|
|
result_writer.Write(utt, result);
|
|
|
|
decodable->Reset();
|
|
|
|
|
|
|
|
decoder.Reset();
|
|
|
|
|
|
|
|
++num_done;
|
|
|
|
++num_done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|