title: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
body: <blockquote>
  <p>An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Speech.dll</p>
  <p>Additional information: Retrieving the COM class factory for component with CLSID {49428A60-C997-4D0E-9808-9E326C178D58} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).</p>
  </blockquote>
  <p>I am following <a href="http://msdn.microsoft.com/en-us/library/hh378426(v=office.14).aspx" rel="nofollow noreferrer">this sample from MSDN</a> for Microsoft Speech Platform SDK 11:</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  using Microsoft.Speech;
  using Microsoft.Speech.Recognition;
  namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
  
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              SpeechRecognitionEngine sre = new SpeechRecognitionEngine(new System.Globalization.CultureInfo(&quot;en-US&quot;));                        ======&gt;&gt;**ERROR** 
              sre.SetInputToWaveFile(@&quot;c:\Test\Colors.wav&quot;);
              Choices colors = new Choices();
              colors.Add(new string[] { &quot;red&quot;, &quot;green&quot;, &quot;blue&quot; });
  
              GrammarBuilder gb = new GrammarBuilder();
              gb.Append(colors);
  
              Grammar g = new Grammar(gb);
              sre.LoadGrammar(g);
  
              // Register a handler for the SpeechRecognized event.
              sre.SpeechRecognized +=
                new EventHandler&lt;SpeechRecognizedEventArgs&gt;(sre_SpeechRecognized);
  
              // Start recognition.
              sre.Recognize();
  
              sre.SpeechRecognized += new EventHandler&lt;SpeechRecognizedEventArgs&gt;(sre_SpeechRecognized);
          
          }
  
          private void sre_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
          {
              MessageBox.Show(&quot;Speech recognized: &quot; + e.Result.Text);
          }
  
         
      }
  }
  </code></pre>