Workaround for another kind of decoder corruption

This commit is contained in:
Daniel Wolf 2016-08-03 21:33:13 +02:00
parent 0a577d1947
commit 1cb41b8309
1 changed files with 5 additions and 0 deletions

View File

@ -135,6 +135,11 @@ BoundedTimeline<string> recognizeWords(const AudioClip& inputAudioClip, ps_decod
ps_seg_frames(it, &firstFrame, &lastFrame); ps_seg_frames(it, &firstFrame, &lastFrame);
result.set(centiseconds(firstFrame), centiseconds(lastFrame + 1), word); result.set(centiseconds(firstFrame), centiseconds(lastFrame + 1), word);
} }
if (result.size() == 2) {
// The two recognized words are "<s>" and "</s>", which is really nothing.
// This seems to trigger a similar decoder corruption.
decoderIsStillUsable = false;
}
return result; return result;
} }