Compartir a través de


Lang Property

  Microsoft Speech Technologies Homepage

Gets or sets the language of the speech recognition engine. Read/write.

Usage

ASP.NET markup: <speech:Reco Lang="..." />
Get value: String = Reco.Lang;
Set value: Reco.Lang = String;
Data type: String
Required: No

Remarks

The possible values for the Lang property appear in the lang definition of the Request for Comment (RFC). For example, a value of "en-US" denotes U.S. English. If the author does not specify a value for the Lang property, the platform defaults to an internal value.

The Lang property mirrors the lang attribute on the SALT listen element.

Example

<form id="Form1" method="post" runat="server">
  ...
  <speech:QA runat="server" ID="QADest" >
    <Prompt Lang="en-US"
      InlinePrompt="Please select a destination city" ID="Prompt1">
        <Params>
          <speech:Param Name="bargeintype">final</speech:Param>
        </Params>
    </Prompt>
    <Answers>
      <speech:Answer SemanticItem="siDest" ID="AnsDest" XPathTrigger="/SML/CITY">
      </speech:Answer>
    </Answers>

    <Reco InitialTimeout="3000" BabbleTimeout="10000"
        EndSilence="1000" MaxTimeout="30000" Reject="0.5" >
      <Grammars>
        <speech:Grammar Type="application/srgs+xml" Lang="en-US"
          Src="Grammars/Cities.grxml" >
        </speech:Grammar>
      </Grammars>
    </Reco>

  </speech:QA>
  ...
</form>

See Also

Reco Class | Reco Constructor | Reco Members | Reco Properties | Reco Methods | Reco Events | Reco Remarks