我可以使用 Metro Style 应用程序中的 System.Speech 吗?
我似乎无法使用 Metro 风格应用程序模板访问任何常用的命名空间。我错过了一些明显的东西吗?
It doesn't seem that I can get to any of the usual namespaces using a Metro Style app template. Am I missing something obvious?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基于 WinRT 构建的 Metro 风格应用程序。虽然目前这是测试版,但 Microsoft 可能会根据您提供的反馈添加一些命名空间,但您不应期望所有命名空间都可用。
编辑:根据.NET for Metro 风格应用程序 目前不包含 System.Speech,如果包含的话也不会说明任何内容。
Metro style applications built on WinRT. While this is currently beta, Microsoft might add some namespaces based on feedback you provide, but you should not expect all namespaces to be available.
Edit: According to .NET for Metro style apps System.Speech isn't currently included nor does it say anything if it will be included.
由于目前您没有可用于 Metro Style 应用程序的语音 API,因此您可以做的就是录制语音并将其发送到将执行您想要的操作的在线服务。如果您想采用此路径,请查看媒体捕获示例 。
如果您想在本地处理音频,您也可以依靠 C++ 来处理这些位。查看Groove Drum Sequencer - HTML/JS 和 WinRT C++ 其中“声音生成是由用 C++ 实现的自定义 WinRT 组件完成的,并使用 XAudio2 来播放从 Javascript 调用的音频。”
Since, at the moment, you don't have a Speech API available for Metro Style Apps, what you could do is record the voice and send it to an online service that will will do what you want. Take a look Media Capture Sample if you want to take this path.
If you want to process the audio locally you could also rely on c++ to process the bits. Take a look at Groove Drum Sequencer - HTML/JS and WinRT C++ where "The sound generation is done by a custom WinRT component implemented in C++ and using XAudio2 for playing audio that is called from Javascript."