*
* @see edu.cmu.sphinx.decoder.ResultListener#newResult(edu.cmu.sphinx.result.Result)
*/
@Override
public void newResult(Result result) {
NISTAlign aligner = getAligner();
String ref = result.getReferenceText();
if (result.isFinal() && (ref != null)) {
try {
Path bestPath = null;
String hyp = "";
if (result.getBestFinalToken() != null) {
ConfidenceResult confidenceResult =
confidenceScorer.score(result);
bestPath = confidenceResult.getBestHypothesis();
hyp = bestPath.getTranscriptionNoFiller();
}
aligner.align(ref, hyp);
if (bestPath != null) {
showDetails(bestPath.getTranscription());
} else {
showDetails("");
}