找不到 Kinect 音频设备 InvalidOperationException

发布于 2024-11-25 03:50:28 字数 193 浏览 0 评论 0原文

有谁知道为什么当 Speech 项目(在 Kinect SDK 中找到)中的下面的代码被击中时会抛出 InvalidOperationException 。我已经按照指示安装了先决条件,但项目拒绝运行。

有人遇到过类似的问题吗??

var source = new KinectAudioSource()

does any one know why the InvalidOperationException is being thrown when the code below in the Speech project (found in the Kinect SDK) is being hit. Ive installed of the prerequisite as instructed the project refuses to run.

Any one had a similar problem ??

var source = new KinectAudioSource()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

魔法少女 2024-12-02 03:50:28

当我没有将 Kinect 插入我的计算机时,我曾在该行上抛出过 InvalidOperationException 异常。除了上面 Danejir 的建议(看看到底是什么问题)之外,还要检查:

  • Kinect 是否已连接到您的计算机,电源是否也已插入/连接?
  • 您是否安装了所有语音库的 x86 版本?

I had an InvalidOperationException thrown on that line once before when I didn't have the Kinect plugged into my computer. Besides what Danejir suggests above (seeing what the issue is exactly), also check:

  • Is the Kinect connected to your computer, and is the power supply plugged in/connected as well?
  • Did you install the x86 versions of all the speech libraries?
ぽ尐不点ル 2024-12-02 03:50:28

在调用 Runtime 对象上的任何其他方法之前,应用程序必须通过调用 Runtime.Initialize 来初始化 Kinect 传感器。 Runtime.Initialize 初始化内部帧捕获引擎,该引擎启动一个线程,从 Kinect 传感器检索数据,并在帧准备就绪时向应用程序发出信号。

如果无法找到 Kinect 传感器,Initialize 方法将抛出 InvalidOperationException。

catch (InvalidOperationException ex)
{
    MessageBox.Show(ex.Message);
}

An application has to initialize the Kinect sensor by calling Runtime.Initialize before calling any other methods on the Runtime object. Runtime.Initialize initializes the internal frame-capture engine, which starts a thread that retrieves data from the Kinect sensor and signals the application when a frame is ready.

The Initialize method is going to throw an InvalidOperationException if it fails to find a Kinect sensor.

catch (InvalidOperationException ex)
{
    MessageBox.Show(ex.Message);
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文