KinectRecognitionResult implements org.jvoicexml.RecognitionResult { @Override public String getUtterance() { final String utterance = extractor.getUtteranceTag(); if ((utterance == null) || utterance.isEmpty()) { return extractor.getUtterance(); } return utterance; } KinectRecognitionResult(
            final SmlInterpretationExtractor smlextrator); @Override Object getSemanticInterpretation(final DataModel model); @Override String getUtterance(); @Override String[] getWords(); @Override float getConfidence(); @Override float[] getWordsConfidence(); @Override ModeType getMode(); @Override boolean isAccepted(); @Override void setMark(String value); @Override String getMark();  }
@Test public void testGetUtterance() throws Exception { final SmlInterpretationExtractor extractor = readSml("sml-simple.xml"); final KinectRecognitionResult result = new KinectRecognitionResult(extractor); Assert.assertEquals("Hello Dirk", result.getUtterance()); }
@Test public void testGetUtteranceTag() throws Exception { final SmlInterpretationExtractor extractor = readSml("sml-tag.xml"); final KinectRecognitionResult result = new KinectRecognitionResult(extractor); Assert.assertEquals("Projectmanager", result.getUtterance()); }
@Test public void testGetUtteranceMultipleTags() throws Exception { final SmlInterpretationExtractor extractor = readSml("sml-multiple-tags.xml"); final KinectRecognitionResult result = new KinectRecognitionResult(extractor); Assert.assertEquals("Hello Dirk", result.getUtterance()); }
@Test public void testGetUtteranceCompound() throws Exception { final SmlInterpretationExtractor extractor = readSml("sml-compound.xml"); final KinectRecognitionResult result = new KinectRecognitionResult(extractor); Assert.assertEquals("a small pizza with salami", result.getUtterance()); }