Microsoft.Speech.dll中发生未处理的"System.Runtime.InteropServices.COMException"类型异常
附加信息:由于以下错误,检索具有CLSID {49428A60-C997-4D0E-9808-9E326C178D58}的组件的COM类工厂失败:80040154未注册类(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG)).
我正在关注Microsoft Speech Platform SDK 11的MSDN示例:
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("en-US")); ======>>**ERROR**
sre.SetInputToWaveFile(@"c:\Test\Colors.wav");
Choices colors = new Choices();
colors.Add(new string[] { "red", "green", …Run Code Online (Sandbox Code Playgroud)