问题
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?
回答1:
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.
回答2:
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."
来源:https://stackoverflow.com/questions/8649124/can-i-use-system-speech-from-a-metro-style-app