Share via


PromptSelectFunction Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the name of a client-side routine that specifies prompt text for the Phone control. Read/write.

Usage

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

Remarks

When the Speech Platform plays the prompt, it attempts to use recorded text from a PromptDatabase, and synthesizes the text if recorded text is not found.

The value of the PromptSelectFunction property is the name of a custom client-side script function, without parameters or parentheses. The client-side dialog manager calls this function, using the following syntax, after the control has been activated and before the prompt playback begins.

The script block that contains this function should be placed before the control that calls the function. For more information, see "Placement of Script Blocks" in Authoring Notes.

Syntax

function FunctionName ( object control )
{
// Client-side code referenced by Phone.PromptSelectFunction
}

Parameters

  • control
    The Application Speech Control object.

Return Value

A string containing the prompt text to be played, or a null string. If the function returns a null string, the inline prompt is played. Application Speech Controls contain built-in prompts for question, confirm, silence, noreco and help. The default behavior is to play the silence, noreco or help prompt if appropriate followed by the question or confirm prompt.

ActiveQAPhase values

The ActiveQAPhase property of the client-side Phone object may be one of the following values:

  • question_fullNumber
  • question_localNumber
  • confirmLocalNumber
  • questionAreaCode
  • confirmAreaCode
  • questionExtension
  • confirmExtension
  • acknowledge

Example

<script language="jscript">
  function myPromptSelectFunction(obj)   {
    if (obj.ActiveQAPhase == "question_fullNumber") {
      return "This is the prompt for the question_fullNumber QA";
    }
  }
</script>
<form id="Form1" method="post" runat="server">
  ...
  <asp:textbox id="tbPhone" runat="server" borderstyle="Solid">
  </asp:textbox>
  <asp:panel ID="SpeechPanel" runat="server">
    <speech:SemanticMap runat="server">
      <speech:SemanticItem ID="siAC" runat="server">
      </speech:SemanticItem>
      <speech:SemanticItem ID="siLN" runat="server">
      </speech:SemanticItem>
      <speech:SemanticItem ID="siEXT" runat="server">
      </speech:SemanticItem>
    </speech:SemanticMap>

    <speech:Phone ID="PhoneQA" 
      QuestionPrompt="quel est votre numéro de téléphone?" 
      PromptSelectFunction="myPromptSelectFunction"
      AreaCodeSemanticItem="siAC" 
      LocalNumberSemanticItem="siLN" 
      ExtensionSemanticItem="siEXT" 
      BabbleTimeout="10000" 
      FirstInitialTimeout="1000" 
      InitialTimeout="3000" 
      MaxTimeout="30000"
      RejectThreshold="0.2" 
      runat="server">
    </speech:Phone>
  ...
</form>

See Also

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