I would like after clicking the button the text is convert to speech then after return to normal so that i can click the button again but currently when i click on the button is processes without ending.
Please help thanks in advance
<%@ Page Language="vb" Async="true" AutoEventWireup="false" CodeBehind="SpeechDone.aspx.vb" Inherits="SulaSignar.SpeechDone" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Button" />
</td>
<td>
<asp:TextBox ID="Specchtxt" runat="server"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="speedUpDown" runat="server" Text="1"></asp:Label>
<asp:Label ID="volumeUpDown" runat="server" Text="100"></asp:Label>
</td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
Public Class SpeechDone
Inherits System.Web.UI.Page
Dim speaker As New SpeechSynthesizer()
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
speaker.Rate = Convert.ToInt32(speedUpDown.Text)
speaker.Volume = Convert.ToInt32(volumeUpDown.Text)
speaker.SelectVoice("Microsoft Hazel Desktop")
speaker.SpeakAsync(Specchtxt.Text)
End Sub
End Class