---
title: "Text to Speech in CSharp .NET"  
description: "/* Style Definitions */   table.MsoNormalTable  	{mso-style-name:\"Table Normal\";  	mso-tstyle-rowband-size:0;  	mso-tstyle-colband-size:0;  	mso-st"  
author: "Uttam Misra"  
published: 2010-07-28  
updated: 2020-06-05  
canonical: https://www.mindstick.com/articles/95/text-to-speech-in-csharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Text to Speech in CSharp .NET

Here I’m about to [explain](https://www.mindstick.com/forum/159699/what-is-a-compilation-error-in-dot-net-core-explain-with-an-example) [Text to Speech](https://www.mindstick.com/forum/113/text-to-speech-in-c-sharp) [feature](https://www.mindstick.com/forum/541/what-is-new-feature-in-sql-server-2012) of C#. This [simple](https://www.mindstick.com/blog/63525/get-the-most-out-of-maths-with-these-8-simple-tricks) example will demonstrate how to use Text to Speech feature of C#.\

##### Example

![Text to Speech in CSharp .NET](https://www.mindstick.com/mindstickarticle/26194095-e776-4686-93d2-e3002dce3b08/images/1c423ae5-8fc1-43a9-b853-45e8d2fa59a6.png)

##### Form Design

##### Code

##### Namespace for voice

```
using SpeechLib; namespace TextTospeech{    public partial class Form1 : Form    {        public Form1()        {            InitializeComponent();        }         private void btnSpeak_Click(object sender, EventArgs e)        {          //creating instance of voice            SpVoice v = new SpVoice();         //Setting Rate of voice            v.Rate = 2;          //calling speak() method of SpVoice class.            v.Speak(rtxtSpeech.Text, SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);        }    }}
```

---

Original Source: https://www.mindstick.com/articles/95/text-to-speech-in-csharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
