Showing posts with label Text Speech. Show all posts
Showing posts with label Text Speech. 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 




Textbox Text to Speech Using in Asp.Net C#

Textbox Text to Speech

Textbox control Text Value speech Async using  in Asp.net C#.

                          Download
                         
                         Video Link

                      HTML Coding


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       
        <asp:TextBox ID="TextBox1" Text="Welcome To Dotnetdrizzles.blogspot.in" runat="server" Width="242px"></asp:TextBox>


    </div>
    </form>
</body>
</html>

                                  C# Coding

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

       using System.Speech.Synthesis;

public partial class TextSpeak : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SpeechSynthesizer spe = new SpeechSynthesizer();
        spe.SpeakAsync(TextBox1.Text);
        // Next Run Textbox text will speak
    }
}

                          
First Add New webform - Add Textbox text





Next - Add Reference - System.Speech  - Ok




Next - Code Behind file - add Namespace -  textbox Call to speechsynthesize




Next - Design File - add Async="true"