I get that expection and cannot figure how to solve it.
I've tried changing culture to fi-FI, en-EN, en-GB, en-US it always gives that expection.
I also tried Culture is not supported solution and Go to Debug -> Options -> Debugging and tick "Enable Just My Code"
this.
.NET Framework 4.7.2 Visual studio 2019 Reference System.Speech
using System;
using System.Speech.Recognition;
namespace SpeechRecognition3
{
class Program
{
static void Main(string[] args)
{
// Create an in-process speech recognizer for the en-US locale.
using (SpeechRecognitionEngine recognizer =
new SpeechRecognitionEngine(
new System.Globalization.CultureInfo("fi-FI")))
{
// Create and load a dictation grammar.
recognizer.LoadGrammar(new DictationGrammar());
// Configure input to the speech recognizer.
recognizer.SetInputToDefaultAudioDevice();
// Modify the initial silence time-out value.
recognizer.InitialSilenceTimeout = TimeSpan.FromSeconds(5);
// Start synchronous speech recognition.
RecognitionResult result = recognizer.Recognize();
if (result != null)
{
Console.WriteLine("Recognized text = {0}", result.Text);
}
else
{
Console.WriteLine("No recognition result available.");
}
}
Console.WriteLine();
Console.WriteLine("Press any key to continue...");
Console.ReadKey();
}
}
}