org.jvoicexml.implementation.external
Class SocketExternalRecognitionListener

java.lang.Object
  extended by org.jvoicexml.implementation.external.SocketExternalRecognitionListener
All Implemented Interfaces:
ExternalRecognitionListener

public final class SocketExternalRecognitionListener
extends Object
implements ExternalRecognitionListener

Class to send RecognitionResults as String to external clients.

Since:
0.7.4
Version:
$Revision: 2905 $
Author:
Josua Arndt, Dirk Schnelle-Walka

Constructor Summary
SocketExternalRecognitionListener()
          Constructs a new SocketExternalRecognitionListener.
 
Method Summary
 void resultAccepted(RecognitionResult result)
          The user made an utterance, that matched an active grammar.
 void resultRejected(RecognitionResult result)
          The user made an utterance, that did not match an active grammar.
 void setPort(int portnumber)
          Set the port to be used.
 void start()
          Starts this external recognition listener.
 void stop()
          Stops this external recognition listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketExternalRecognitionListener

public SocketExternalRecognitionListener()
Constructs a new SocketExternalRecognitionListener.

Method Detail

setPort

public void setPort(int portnumber)
Set the port to be used.

Parameters:
portnumber - used port

resultAccepted

public void resultAccepted(RecognitionResult result)
The user made an utterance, that matched an active grammar. Sends recognized result text as string.

Specified by:
resultAccepted in interface ExternalRecognitionListener
Parameters:
result - The recognition result.

resultRejected

public void resultRejected(RecognitionResult result)
The user made an utterance, that did not match an active grammar. Sends "Recognition Listener: result rejected." text as String.

Specified by:
resultRejected in interface ExternalRecognitionListener
Parameters:
result - The recognition result.

start

public void start()
Starts this external recognition listener.

Specified by:
start in interface ExternalRecognitionListener

stop

public void stop()
Stops this external recognition listener.

Specified by:
stop in interface ExternalRecognitionListener


Copyright © 2005-2010JVoiceXML group.