Partilhar via


Resume Method

  Microsoft Speech Technologies Homepage

Resumes playback without flushing the audio buffer.

prompt.Resume()

Remarks

The Resume method is a Microsoft-specific extension to Speech Application Language Tags (SALT). The Resume method of the prompt element is not implemented for Telephony Application Services.

The Resume method has no effect if playback has not been paused. Note that the Resume method is a synchronous method that returns 0 if the prompt is successfully resumed, or -1 if it is not.

Example

The following code demonstrates the use of the Resume 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">

      This is a very long prompt. While this prompt is playing, please
      click the buttons to pause and resume the playing of this prompt.

    </salt:prompt>

    <input type="button" name="BtnStart" value="Start Prompt" OnClick="StartPrompt()" id="StartBtn">
    <input type="button" name="BtnPause" value="Pause Prompt" OnClick="PausePrompt()" id="PauseBtn">
    <input type="button" name="BtnResume" value="Resume Prompt" OnClick="ResumePrompt()" id="ResumeBtn">

    <script language="JScript">
    <!--
      function StartPrompt() {
        Prompt1.Start();
      }
      function PausePrompt() {
        Prompt1.Pause();
      }
      function ResumePrompt() {
        Prompt1.Resume();
      }
    -->
    </script>
  </body>
</html>

See Also

prompt Element |  PromptQueue Object | Pause Method | Start Method | Stop Method