User Login





Register
Forget Password

Hostings with very low prices

Hosting Plans Starting at 1$/Month

BaydHost

Powered By

  • AhmBay
  • How to make use of SAPI in your ASP pages? - Webmaster Tips, Knowledge Base Webmaster Tools

    Home > > How to make use of SAPI in your ASP pages?
    Category:
    Written by: Admin
    Date: 2008-11-10
    Rating: 0   Puan:0 | Katılımcı:0 | Voted : 0 times
    Hit: 22
      

    How to make use of SAPI in your ASP pages?
    --------------------------------------------------------------------------------

    Ort. 0.00,Oy 0
    Yazar: FERDIKUCUK
    Eklenme: 14/02/08 Okunma: 64





    --------------------------------------------------------------------------------




    Overview
    Following is the source code for a basic and simple program for beginners that shows how to use Microsoft Speech Application Programming Interface (SAPI) in your ASP pages. You may modify it according to your own requirements.



    Requirements



    Microsoft SAPI 5.1
    Internet Information Server OR Personal Web Server
    Permission to run and create SAPI objects in ASP pages if you are using Windows 2000/XP


    Source Code


    <%
    ' Declaring variable to hold SAPI object.
    Dim voic

    ' Creating SAPI object using spvoice.
    Set voic = Server.CreateObject("SAPI.SpVoice")

    ' If you want to change the voice then uncomment any of the following 3 lines.

    'Set voic.voice = voic.GetVoices("Name=Microsoft mary", "Language=409").Item(0)
    'Set voic.voice = voic.GetVoices("Name=Microsoft mike", "Language=409").Item(0)
    'Set voic.voice = voic.GetVoices("Name=Microsoft sam", "Language=409").Item(0)

    ' you can set other parameters and properties like voice pitch, speed etc.

    ' Using speak function of SpVoice to speak a string.
    voic.Speak("Welcome To My First Speech Enabled ASP Page, Have a nice day!")

    ' Destroying SAPI.spvoice object.
    Set voic = nothing
    %>