Showing posts with label Audio. Show all posts
Showing posts with label Audio. Show all posts

Alert Message with Audio Play (Text Speech) on PageLoading Using Javascript in Asp.Net

Alert Message with Audio Play (Text Speech) on PageLoading


Alert Message Show with Audio Play from text speech on page loading Using Javascript in Asp.Net.

                                   DEMO



                                Download
                      
                            HTML Coding


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Alert Message with Audio Play (Text Speech) on PageLoading Using Javascript in Asp.Net </title>
    <script type="text/javascript">

        // Alert message show with audio paly Using Javascript
        function alert_audio()
        {
            var text = new SpeechSynthesisUtterance('Welcome to dotnetdrizzles.blogspot.in');
            window.speechSynthesis.speak(text);

            alert('www.dotnetdrizzles.blogspot.in \n\r Play audio in background');          
        }
        window.onload = alert_audio;

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    </form>
</body>

</html>

                  
Add New Form - text speech & alert message at a time 




Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation can only be started on a page prior to PreRenderComplete event.

Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation can only be started on a page prior to PreRenderComplete event.




Add - Async="true"




Text Values Speak Using Javascript in Asp.Net

Text Values Speak Using Javascriptext 

Textbox text value Speak Automatically on Page Loading in Asp.Net Using Javascript.

                         HTML Coding


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Text Values Speak Using Javascript in Asp.Net</title>
    <script type="text/javascript">

        // Text Values Speak Using Javascript

        var text = new SpeechSynthesisUtterance('Welcome to dotnetdrizzles.blogspot.in');
        window.speechSynthesis.speak(text);


    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    </form>
</body>

</html>


Add New - Webform - add text to SpeechSynthesis - Pageloading Paly Audio