Partilhar via


param Element

  Microsoft Speech Technologies Homepage

Specifies a Speech Platform configuration parameter.

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

The param element has the following attributes.

Attributes 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 configuration of the Speech Platform. 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 the Speech Platform.

Element Name Parameter Name Parameter Value(s) Description Default Value
prompt server HTTP address Uniform Resource Identifier (URI) describing the location of the server used for speech processing. This parameter does not apply for Telephony Application Services. For local desktop: https://localhost/ses/lobby.asmx.
For remote desktop use: If no server is specified, the default Speech Server name is retrieved from the Domain Name Server (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. grammar is the default value for the Speech Add-in for Microsoft Internet Explorer clients.
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. Note that in this case the browser must raise onbargein before raising the onreco event.  
confidential true or false Specifies if a prompt, listen or dtmf interaction is private. As a result of this setting, Telephony Application Services and Speech Engine Services restrict what is logged. false
listen server HTTP address Uniform Resource Identifier (URI) describing the location of the server used for speech processing. This parameter does not apply for Telephony Application Services. For local desktop: https://localhost/ses/lobby.asmx.
For remote desktop use: If no server is specified, the default Speech Server name is retrieved from the Domain Name Server (DNS) server.
confidential true or false Specifies if a prompt, listen or dtmf interaction is private. As a result of this setting, Telephony Application Services (TAS) and Speech Engine Services (SES) restrict 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 are 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 Script that executes when the responseFeedback parameter is passed to the Speech Platform. This parameter only applies to TAS. 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 will pass the name/value pair through directly to the underlying speech recognition engine. This is only valid for the listen element. No default
permittedSREngine Name of 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 if a prompt, listen or dtmf interaction is private. As a result of this setting, Telephony Application Services and Speech Engine Services restrict 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>
    <object id="Speechtags" CLASSID="clsid:DCF68E5B-84A1-4047-98A4-0A72276D19CC" VIEWASTEXT></object>
  </head>
  <body>
    <?import namespace="salt" implementation="#Speechtags" />
    <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 id="cities" src="cities.grxml"></salt:grammar>
    </salt:listen>

    <input type="button" name="BtnStart1" value="Start Prompt" OnClick="StartPlayback()" id="Button1">
    <input type="button" name="BtnStop" value="Stop Prompt" OnClick="StopPlayback()" id="BtnStop">

    <br><br>
    
    <input type="textbox" name="TxtBox1" value="Start Prompt" OnClick="StartPlayback1()" id="TxtBox1">

    <script language="JScript">
    <!--
      function StartPlayback() {
        StartListening();
        Prompt1.Start();
      }
      function StopPlayback() {
        testreco.Stop();
        Prompt1.Stop();
      }
      function StartListening() {
        TxtBox1.value = "Starting to listen...";
        testreco.Start();
        TxtBox1.value = "Listening.";
      }
      function Handleonreco() {
        testreco.Stop();
        TxtBox1.value = event.srcElement.text;
      }
      function HandleBargeIn() {
        testreco.Stop();
        Prompt1.Stop();
        TxtBox1.value = "BargeIn"
      }
    -->
    </script>
  </body>
</html>

See Also

dtmf Element; |  listen Element | prompt Element | name Attribute | xmlns Attribute