Partager via


param Element

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Specifies a Speech Server configuration parameter.

Syntax

<param name="paramName" xmlns="nameSpace">paramValue</param>

Attributes

The param element has the following attributes.

Attribute Description

name

Specifies the name of the parameter to be configured.

xmlns

Specifies the namespace and potential schema for Extensible Markup Language (XML) content of the parameter. Optional.

Remarks

The param element is a child of three top-level elements (dtmf, listen, and prompt). The general purpose of the param element is to allow custom Speech Server configurations. The value of the name attribute defines the nature of the configuration parameter. The actual configuration value is expressed within the parameter element. This parameter value affects the behavior of the parent element. Specify values of parameters in an XML namespace to allow complex or structured values.

The following table lists the various parameter settings that are recognized by Speech Server.

Element Parameter Parameter Value Description Default Value

prompt

server

HTTP address

The Uniform Resource Identifier (URI) describing the location of the server used for speech processing.

For local desktop: http://localhost/ses/lobby.asmx. For remote desktop use: If no server is specified, the default Speech Server name is retrieved from the DNS server.

bargeintype

speech

Specifies that any speech or sound energy recognized by the recognition engine raises the onbargein event.

speech is the default value for Speech Server.

grammar

Specifies that audio partially matching the recognition grammar can cause the onbargein event to be raised. The speech client decides when to raise the onbargein event based on the capabilities sent by Speech Server when a session is opened.

final

Specifies a valid final recognition result (that is, a result where the utterance confidence level is above the reject threshold). Run in multiple recognition mode, this represents the recognizer continuously listening for a valid result, for hotword/wake-up style scenarios. In this case, the browser must raise onbargein before raising the onreco event.

confidential

true or false

Specifies whether a prompt, listen, or dtmf interaction is private. As a result of this setting, Speech Server restricts what is logged.

false

listen

server

HTTP address

The URI describing the location of the server used for speech processing.

For local desktop: http://localhost/ses/lobby.asmx. For remote desktop use: If no server is specified, the default Speech Server name is retrieved from the DNS server.

confidential

true or false

Specifies whether a prompt, listen, or dtmf interaction is private. As a result of this setting, Speech Server restricts what is logged.

false

nbest

An integer between -1 and 4,294,967,295 (ULONG_MAX)

Specifies the number of alternate hypotheses to return. If the setting is 0, 1, or an invalid value, a single hypothesis is returned. If the setting is -1, the maximum number of alternative hypotheses is returned. Setting to a number N > 1 returns that number of alternates or the maximum that the engine can provide (if less than N).

0

responseFeedback

A script that executes when the responseFeedback parameter is passed to Speech Server.

The following gives users a response after they finish speaking, by starting a prompt element on the page (representing the response feedback) before the next system prompt starts.

<salt:listen id="reco1" />
  <salt:param name="responseFeedback">
    thankyouPrompt.Start();
  </salt:param>
</salt:listen>

Not enabled by default

expando

name and value

This mechanism allows an application author to set configuration parameters on the underlying speech recognition engine. The speech application author can specify any name/value pairing other than the other ones specified in this table. If not recognized, Speech Server passes the name/value pair through directly to the underlying speech recognition engine. This is only valid for the listen element.

No default

permittedSREngine

The name of a non-Microsoft speech engine. The exact name of the speech engine (required for this parameter) can be found on the Speech Recognition tab of the Speech icon in Control Panel.

Specifies non-Microsoft speech recognition engines that are allowed for desktop recognition. This parameter is only valid for the listen element.

Microsoft English (U.S.) v6.1 Recognizer

dtmf

confidential

true or false

Specifies whether a prompt, listen, or dtmf interaction is private. As a result of this setting, Speech Server restricts what is logged.

false

Example

The following code demonstrates the use of the param element.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:salt="http://www.saltforum.org/2002/SALT">
    <head>
    </head>
    <body onload="StartPlayback()">
        <salt:prompt id="Prompt1" bargein ="true" onbargein="HandleBargeIn()">
            <salt:param name="bargeintype">final</salt:param>
            This is a long prompt, intended to be 
            interrupted by the user's spoken input.
            Please interrupt this prompt.
        </salt:prompt>
        <salt:listen id="testreco" onreco="Handleonreco()">
            <salt:grammar name="cities"> 
                <grammar version="1.0" tag-format="semantics-ms/1.0" xml:lang="en-US" 
                xmlns="http://www.w3.org/2001/06/grammar" root="cities">
                    <rule id="cities">
                        <one-of>
                            <item>Seattle</item> 
                            <item>Boston</item> 
                            <item>Houston</item> 
                            <item>Dallas</item> 
                        </one-of>
                    </rule>
                </grammar>
            </salt:grammar>
        </salt:listen>
        <script language="JScript">
        <!--
            function StartPlayback() {
                StartListening();
                Prompt1.Start();
            }
            function StartListening() {
                testreco.Start();
            }
            function Handleonreco() {
                testreco.Stop();
            }
            function HandleBargeIn() {
                testreco.Stop();
            }
        -->
        </script>
    </body>
</html>

See Also

Concepts

dtmf Element
listen Element
prompt Element
grammar.name Attribute
param.xmlns Attribute