System.Speech 10.0.12

About

Provides APIs for speech recognition and synthesis built on the Microsoft Speech API in Windows. Not supported on other platforms.

This package is provided primarily for compatibility with code being ported from .NET Framework and is not accepting new features.

Key Features

How to Use

Synthesis example

using System.Speech.Synthesis;

// Initialize a new instance of the SpeechSynthesizer.
SpeechSynthesizer synth = new SpeechSynthesizer();

// Configure the audio output.
synth.SetOutputToDefaultAudioDevice();

// Speak a string, synchronously
synth.Speak("Hello World!");

// Speak a string asynchronously
var prompt = synth.SpeakAsync("Goodnight Moon!");

while (!prompt.IsCompleted)
{
    Console.WriteLine("speaking...");
    Thread.Sleep(500);
}

Recognition example

// Create a new SpeechRecognitionEngine instance.
using SpeechRecognizer recognizer = new SpeechRecognizer();
using ManualResetEvent exit = new ManualResetEvent(false);

// Create a simple grammar that recognizes "red", "green", "blue", or "exit".
Choices choices = new Choices();
choices.Add(new string[] { "red", "green", "blue", "exit" });

// Create a GrammarBuilder object and append the Choices object.
GrammarBuilder gb = new GrammarBuilder();
gb.Append(choices);

// Create the Grammar instance and load it into the speech recognition engine.
Grammar g = new Grammar(gb);
recognizer.LoadGrammar(g);

// Register a handler for the SpeechRecognized event.
recognizer.SpeechRecognized += (s, e) =>
{
    Console.WriteLine($"Recognized: {e.Result.Text}, Confidence: {e.Result.Confidence}");
    if (e.Result.Text == "exit")
    {
        exit.Set();
    }
};

// Emulate
Console.WriteLine("Emulating \"red\".");
recognizer.EmulateRecognize("red");

Console.WriteLine("Speak red, green, blue, or exit please...");

exit.WaitOne();

Main Types

The main types provided by this library are:

  • System.Speech.Recognition.SpeechRecognizer
  • System.Speech.Synthesis.SpeechSynthesizer

Additional Documentation

Feedback & Contributing

System.Speech is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on System.Speech.

Packages Downloads
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
49
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
48
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
47
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
46
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
45
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
44
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
43

.NET 8.0

  • No dependencies.

.NET 9.0

  • No dependencies.

.NET 10.0

  • No dependencies.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
11.0.0-rc.1.26425.128 13 09/09/2026
11.0.0-preview.7.26381.103 13 08/14/2026
11.0.0-preview.6.26359.118 20 07/16/2026
11.0.0-preview.5.26302.115 25 06/11/2026
11.0.0-preview.4.26230.115 29 05/14/2026
11.0.0-preview.3.26207.106 33 04/16/2026
11.0.0-preview.2.26159.112 32 03/11/2026
11.0.0-preview.1.26104.118 33 02/12/2026
10.0.12 10 09/09/2026
10.0.11 15 08/14/2026
10.0.10 15 07/17/2026
10.0.9 21 06/11/2026
10.0.8 28 05/14/2026
10.0.7 33 04/22/2026
10.0.6 32 04/16/2026
10.0.5 37 03/13/2026
10.0.4 34 03/11/2026
10.0.3 38 02/12/2026
10.0.2 39 01/16/2026
10.0.1 46 12/11/2025
10.0.0 34 12/13/2025
10.0.0-rc.2.25502.107 36 12/12/2025
10.0.0-rc.1.25451.107 44 12/12/2025
10.0.0-preview.7.25380.108 35 12/12/2025
10.0.0-preview.6.25358.103 31 12/10/2025
10.0.0-preview.5.25277.114 44 12/12/2025
10.0.0-preview.4.25258.110 35 12/10/2025
10.0.0-preview.3.25171.5 38 12/11/2025
10.0.0-preview.2.25163.2 38 12/10/2025
10.0.0-preview.1.25080.5 36 12/10/2025
9.0.20 10 09/10/2026
9.0.19 13 08/14/2026
9.0.18 17 07/17/2026
9.0.17 20 06/11/2026
9.0.16 22 05/15/2026
9.0.15 32 04/16/2026
9.0.14 32 03/11/2026
9.0.13 43 02/12/2026
9.0.12 41 01/16/2026
9.0.11 35 12/12/2025
9.0.10 42 12/13/2025
9.0.9 41 12/12/2025
9.0.8 30 12/24/2025
9.0.7 30 01/06/2026
9.0.6 31 12/10/2025
9.0.5 35 12/15/2025
9.0.4 33 12/12/2025
9.0.3 38 12/11/2025
9.0.2 39 12/13/2025
9.0.1 32 12/10/2025
9.0.0 29 12/10/2025
9.0.0-rc.2.24473.5 31 12/12/2025
9.0.0-rc.1.24431.7 22 12/10/2025
9.0.0-preview.7.24405.7 23 12/10/2025
9.0.0-preview.6.24327.7 26 12/13/2025
9.0.0-preview.5.24306.7 26 12/12/2025
9.0.0-preview.4.24266.19 22 12/12/2025
9.0.0-preview.3.24172.9 22 12/10/2025
9.0.0-preview.2.24128.5 27 12/11/2025
9.0.0-preview.1.24080.9 27 12/10/2025
8.0.0 39 12/10/2025
8.0.0-rc.2.23479.6 34 12/10/2025
8.0.0-rc.1.23419.4 34 12/10/2025
8.0.0-preview.7.23375.6 26 12/10/2025
8.0.0-preview.6.23329.7 25 12/10/2025
8.0.0-preview.5.23280.8 20 12/10/2025
8.0.0-preview.4.23259.5 33 12/12/2025
8.0.0-preview.3.23174.8 29 12/12/2025
8.0.0-preview.2.23128.3 35 12/10/2025
8.0.0-preview.1.23110.8 33 12/10/2025
7.0.0 27 12/10/2025
7.0.0-rc.2.22472.3 30 12/10/2025
7.0.0-rc.1.22426.10 27 12/10/2025
7.0.0-preview.7.22375.6 28 12/10/2025
7.0.0-preview.6.22324.4 20 12/10/2025
7.0.0-preview.5.22301.12 20 12/10/2025
7.0.0-preview.4.22229.4 29 12/10/2025
7.0.0-preview.3.22175.4 23 12/13/2025
7.0.0-preview.2.22152.2 27 12/11/2025
7.0.0-preview.1.22076.8 24 12/10/2025
6.0.2-mauipre.1.22102.15 27 12/13/2025
6.0.2-mauipre.1.22054.8 17 12/13/2025
6.0.0 30 12/10/2025
6.0.0-rc.2.21480.5 25 12/10/2025
6.0.0-rc.1.21451.13 25 12/10/2025
6.0.0-preview.7.21377.19 20 12/10/2025
6.0.0-preview.6.21352.12 23 12/10/2025
6.0.0-preview.5.21301.5 28 12/12/2025
6.0.0-preview.4.21253.7 21 12/11/2025
6.0.0-preview.3.21201.4 23 12/10/2025
6.0.0-preview.2.21154.6 22 12/11/2025
6.0.0-preview.1.21102.12 24 12/10/2025
5.0.0 24 12/10/2025