org.jvoicexml.implementation.jsapi10
Interface SpokenInputConnectionHandler

All Known Implementing Classes:
Sphinx4ConnectionHandler

public interface SpokenInputConnectionHandler

JSAPI 1.0 does not know how to stream audio from a client to a server. However, custom implementations exist to fill this gap. Classes implementing this interface can be used to address this custom implementation.

Note that there is only one object to handle the connections for all recognizers.

Since:
0.6
Version:
$Revision: 2355 $
Author:
Dirk Schnelle

Field Summary
static String CONFIG_KEY
          Configuration key.
 
Method Summary
 void connect(ConnectionInformation client, SpokenInput input, Recognizer recognizer)
          Establishes a connection from the given ConnectionInformation to this object.
 void disconnect(ConnectionInformation client, SpokenInput input, Recognizer recognizer)
          Disconnects a previously established connection.
 URI getUriForNextSpokenInput(ConnectionInformation client)
          Delegate from SpokenInput.getUriForNextSpokenInput(). .
 

Field Detail

CONFIG_KEY

static final String CONFIG_KEY
Configuration key.

See Also:
Constant Field Values
Method Detail

connect

void connect(ConnectionInformation client,
             SpokenInput input,
             Recognizer recognizer)
             throws IOException
Establishes a connection from the given ConnectionInformation to this object.

Parameters:
client - data container with connection relevant data.
input - the current spoken input.
recognizer - the current recognizer.
Throws:
IOException - error establishing the connection.

disconnect

void disconnect(ConnectionInformation client,
                SpokenInput input,
                Recognizer recognizer)
Disconnects a previously established connection.

Parameters:
client - data container with connection relevant data.
input - the current spoken input.
recognizer - the current recognizer.

getUriForNextSpokenInput

URI getUriForNextSpokenInput(ConnectionInformation client)
                             throws NoresourceError
Delegate from SpokenInput.getUriForNextSpokenInput(). .

Parameters:
client - data container with connection relevant data.
Returns:
URI of the input source, maybe null if the streaming uses other means of audio output.
Throws:
NoresourceError - Error accessing the device.


Copyright © 2005-2009JVoiceXML group.