Feedback

  • Contents
 

Reco Wait For Grammars

This Reco tool can be used in conjunction with the asynchronous grammar registration mode to ensure that all grammars are ready before an actual recognition takes place and alternatively fall back to DTMF input.

Very large voice grammars may take quite a while to compile. The first call that registers that grammar would block in the Reco Input tool until the grammars are ready on the ASR server. Using this tool allows the handler to register several grammars asynchronously, go on to do other processing, return later to determine if the grammars are ready, and then decide whether to use DTMF or voice input.

If any of the specified grammars has been registered with the Lazy registration mode, they will be sent to the ASR server and the tool will wait for their registration.

DTMF grammar can be specified as arguments also, but DTMF grammars are always ready immediately after registration, regardless of registration mode.

Note: This tool is intended for advanced applications. As it adds some processing overhead, it should only be used if the application requires this kind of dialog processing. If at all possible, large grammars should be precompiled or preloaded.

Inputs

Interaction

Identifier of the interaction.

Grammars

Space delimited list of grammar IDs to check.

Max. Wait Time

Maximum amount of time to wait for the grammars to become available. The default wait time is five seconds. Enter a negative value if you want the tool to wait indefinitely.

Outputs

Pending Grammars

Space delimited list of grammars that are not yet ready.

Error Code

If the registration fails, this output parameter contains an error code in the form of a VoiceXML event. This will be an empty string if no error occurred.

Error Text

If the tool fails, this output parameter will contain a simple textual description of what went wrong (e.g. reason for compilation error).

Exit Paths

Ready

This path is taken if all specified grammars are ready for recognition.

Not Ready

This path is taken if one or more of the grammars is not yet ready.

Failure

This path is taken if an error occurred.