In your button click,
remove your exisitng code and add this
protected void btn1_Click(object sender, EventArgs e)
{
SpeechSynthesizer speech = new SpeechSynthesizer();
speech.SpeakAsync(txtspeach.Text);
speech.SelectVoiceByHints(VoiceGender.Female);
}
In your aspx page , add Async="true" in your page tag
<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Default.aspx.cs" Inherits="Text_To_Voice._Default" %>
Thanks & Regards,
Santhosh
Please mark this answer as accepted answer if it resolves your problem.