Home > Articles > Web Services > XML

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

3.41 property

Element type

property

Attributes

name | value

Parents

field | form | initial | menu | object | record | subdialog | transfer | vxml

Children

None.

Description

Sets the platform property of the given name to the given value. This element allows the VoiceXML author to fine-tune the interpreter's behavior. Your mileage may vary with many of the properties described here, as VoiceXML platforms vary greatly in this respect.

DTD

<!ELEMENT property EMPTY >
<!ATTLIST property
  name  NMTOKEN #REQUIRED
  value CDATA   #REQUIRED >

Language model

Attributes

  • name : NMTOKEN

    The name of the platform property to set. A VoiceXML platform can support platform-specific properties. These should be named using the Java-package URL convention, e.g. com.voicegenie.asrinittimeout.

  • value : CDATA

    The value to which the named property should be set.

There is a number of properties that must be supported by all VoiceXML compliant platforms.

The following are the generic speech recognizer properties:

  • completetimeout

    The length of silence required after the user speech before the speech recognizer finalizes a result (either accepting it or throwing a nomatch event). The completetimeout value is used when the speech is a complete match of an active grammar. By contrast, the incompletetimeout is used when the speech is an incomplete match of an active grammar. A too long completetimeout value delays the result completion and therefore can make the computer's response slow. A short completetimeout may lead to an utterance being broken up inappropriately. Reasonable completetimeout values are typically in the range of 0.3 to 1.0 seconds.

  • confidencelevel

    The speech recognition confidence level, a floating point value in the range of 0.0 to 1.0. Results are rejected (a nomatch event is thrown) when the engine's confidence in its interpretation is below this threshold. A value of 0.0 means that minimum confidence is needed for a recognition, and a value of 1.0 requires maximum confidence. The default value is 0.5.

  • incompletetimeout

    The required length of silence after the user speech before the recognizer finalizes a result. The incompletetimeout applies when the speech prior to the silence is an incomplete match of all active grammars. In this case, once the timeout has elapsed, the partial result is rejected (with a nomatch event). The incompletetimeout also applies when the speech prior to the silence is a complete match of an active grammar, but where it is possible to speak further and still match the grammar. By contrast, the completetimeout is used when the speech is a complete match to an active grammar and no further words can bespoken. A long incompletetimeout value delays the result completion and therefore can make the computer's response slow. A short incompletetimeout may lead to an utterance being broken up inappropriately. The incompletetimeout is usually longer than the completetimeout to allow users to pause in mid-utterance (for example, to breathe).

  • maxspeechtimeout (2.0)

    The maximum duration of user speech. If this time has elapsed before the user stops speaking, the event maxspeechtimeout is thrown. The default duration is platform dependent.

  • sensitivity

    The sensitivity level. A value of 1.0 means that the recognition is highly sensitive to quiet input. A value of 0.0 means it is least sensitive to noise. The default value is 0.5.

  • speedvsaccuracy

    A hint specifying the desired balance between speed and accuracy. A value of 0.0 means fastest recognition; a value of 1.0 means best accuracy. The default value is 0.5.

The following are the generic DTMF recognizer properties:

  • interdigittimeout

    The inter-digit timeout value to use when recognizing DTMF input. The default is platform dependent.

  • termchar

    The terminating DTMF character for DTMF input recognition. The default value is "#".

  • termtimeout

    The terminating timeout to use when recognizing DTMF input. The default value is "0s".

The following are the prompt and collect properties:

  • bargein

    The bargein attribute to use for prompts. Setting this to true allows barge-in by default. Setting it to false disallows barge-in. The default value is true.

  • bargeintype

    Sets the type of bargein to energy, speech, or recognition. Default is platform-specific.

  • timeout

    The time after which a noinput event is thrown. The default value is platform dependent.

The following are the fetching properties:

  • audiofetchhint

    This tells the platform whether it can attempt to optimize dialog interpretation by prefetching audio. The value is either safe to indicate audio is only fetched when it is needed, or prefetch to permit, but not require, the platform to prefetch the audio. The default value is prefetch.

  • audiomaxage

    Tells the platform the maximum acceptable age, in seconds, of cached audio resources. The default is platform-specific.

  • audiomaxstale

    Tells the platform the maximum acceptable staleness, in seconds, of expired cached audio resources. The default is platform-specific.

  • documentfetchhint

    Tells the platform whether documents may be prefetched. The value is either safe (the default) or prefetch.

  • documentmaxage

    Tells the platform the maximum acceptable age, in seconds, of cached documents. The default is platform-specific.

  • documentmaxstale

    Tells the platform the maximum acceptable staleness, in seconds, of expired cached documents. The default is platform-specific.

  • fetchaudio

    The URI of the audio to play while waiting for a document to be fetched. The default is not to play any audio during fetch delays. There are no fetchaudio properties for audio, grammars, objects, and scripts. The fetching of the audio clip is governed by the audiofetchhint, audiomaxage, audiomaxstale, and fetchtimeout properties in effect at the time of the fetch. The playing of the audio clip is governed by the fetchaudiodelay and fetchaudiominimum properties in effect at the time of the fetch.

  • fetchaudiodelay (2.0)

    The time interval to wait at the start of a fetch delay before playing the fetchaudio source. The default interval is platform dependent, e.g. "2s". The idea is that when a fetch delay is short, it may be better to have a few seconds of silence instead of a bit of fetchaudio that is immediately cut off.

  • fetchaudiominimum (2.0)

    The minimum time interval to play a fetchaudio source, once started, even if the fetch result arrives in the meantime. The default is platform dependent, e.g. "5s". The idea is that once the user does begin to hear fetchaudio, it should not be stopped too quickly.

  • fetchtimeout

    The timeout for fetches. The default value is platform dependent.

  • grammarfetchhint

    Tells the platform whether grammars may be prefetched. The value is either prefetch (the default) or safe.

  • grammarmaxage

    Tells the platform the maximum acceptable age, in seconds, of cached grammars. The default is platform-specific.

  • grammarmaxstale

    Tells the platform the maximum acceptable staleness, in seconds, of expired cached grammars. The default is platform-specific.

  • objectfetchhint

    Tells the platform whether the URI contents for object may be prefetched. The values are prefetch (the default) or safe.

  • objectmaxage

    Tells the platform the maximum acceptable age, in seconds, of cached objects. The default is platform-specific.

  • objectmaxstale

    Tells the platform the maximum acceptable staleness, in seconds, of expired cached objects. The default is platform-specific.

  • scriptfetchhint

    Tells the platform whether scripts may be prefetched. The values are prefetch (the default) or safe.

  • scriptmaxage

    Tells the platform the maximum acceptable age, in seconds, of cached scripts. The default is platform-specific.

  • scriptmaxstale

    Tells the platform the maximum acceptable staleness, in seconds, of expired cached scripts. The default is platform-specific.

The following are miscellaneous properties:

  • inputmodes

    This property determines which input mode to use. The input modes are dtmf and voice. On platforms that support both modes, inputmodes defaults to "dtmf voice". To disable speech recognition, set inputmodes to "dtmf". To disable DTMF, set it to "voice". One use for this would be to turnoff speech recognition in noisy environments. Another would be to conserve speech recognition resources by turning them off where the input is always expected to be DTMF.

  • maxnbest

    This property controls the maximum size of the application.lastresult$ array; the array is constrained to be no larger than the value specified by maxnbest. This property has a minimum value of 1. The default value is 1.

  • universals

    Production-grade applications often need to define their own universal command grammars, e.g. to increase application portability or to provide a distinctive interface. They specify new universal command grammars with link elements. The default grammars can then be turned off with this property. Default catch handlers are not affected by this property. The value "none" is the default which means that all platform default universal command grammars are disabled. The value "all" turns them all on. Individual grammars are enabled by listing their names separated by spaces. For instance, "cancel exit help" is equivalent to "all".

Children

None.

Examples

In Example 3-52, the bargein property is set to true for the document. Once the interpreter is within the form, the property is set to false hence prohibiting the caller from barging in on "Welcome to the telephone banking system." The property is set again to true in the acctno field hence allowing the caller to barge in on "Please enter your account number now." When the interpreter reaches the filled element, the property value of the form now prevails so the caller can not barge in on "Thank you."

Example 3-52 Four bargein properties in four different variable scopes

<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="2.0">
  <property name="bargein" value="true"/>

  <form id="welcome">
    <property name="bargein" value="false"/>
    <initial> Welcome to the telephone banking system.</initial>
    <field name="acctno" type="digits">
      <property name="bargein" value="true"/>
      <prompt>Please enter your account number now.</prompt>
    </field>

    <filled>
      <prompt>Thank you.</prompt>
    </filled>
  </form>
</vxml>
  • + Share This
  • 🔖 Save To Your Account