Share via


Start Method

  Microsoft Speech Technologies Homepage

Starts prompt playback.

prompt.Start(promptString)

Remarks

The Start method plays the contents of the prompt element. The promptString parameter is examined first for prompt content. If the promptString parameter is empty, alternative prompt contents are examined. Only one prompt element can play at a time. If the Start method is called several times in succession, all prompts are played in sequence. When each prompt finishes playback, the oncomplete event is raised, and the status attribute is set to zero. The status attribute is set to a non-zero value if an error occurs.

The Start method queues the prompt onto the subqueue and begins playback immediately, if no other prompt elements are playing. For Telephony Application Services, the Start method is analogous to execution of the following two methods run in succession.

  • prompt.Queue([arg])
  • PromptQueue.Start()

The contents, arguments, and subsequent resulting events behave exactly as if these calls were made sequentially.

Example

The following code demonstrates the use of the Start method.

<!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"></salt:prompt>
    
    <input type="button" name="BtnStart1" value="Start Prompt" OnClick="StartPlayback1()" id="Button1">

    <script language="JScript">
    <!--
      function StartPlayback1() {
        Prompt1.Start("Thank you for clicking the Start Prompt button.");   
      }
    -->
    </script></P>
  </body>
</html>

See Also

prompt Element |  PromptQueue Object | Stop Method