Possible to Stream wav File to Windows.Media.SpeechRecognition?

天大地大妈咪最大 提交于 2019-12-24 15:51:53

问题


Is there an out-of-the-box solution to stream a wav file/memory to a UWP app? Windows.Media.SpeechRecognition looks like it only accepts microphone input. Is there a way to use System.Speech.Recognition in a UWP app? Is there an official way to use Windows.Media.SpeechRecognition in a Windows desktop app?


回答1:


Please check Speech APIs, this is a set of REST API provided by Microsoft which can accept wav files.




回答2:


You can use VB-Audio Virtual cable http://vb-audio.pagesperso-orange.fr/Cable/index.htm in order to transcribe a .wav file.

You can use Windows.Media.SpeechRecognition API in a console or desktop app in the same way you can reference the other UWP API:

  • Edit "yourproject".csproj
  • Add TargetPlatformVersion10.0 /TargetPlatformVersion below TargetFrameworkVersion
  • Reload Project
  • Add Reference->Browse Windows.winmd from C:\Program Files (x86)\Windows Kits\10\UnionMetadata
  • Add Reference->Browse System.Runtime.WindowsRuntime from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.WindowsRuntime.dll.
  • set "Copy Local=False" into System.Runtime.WindowsRuntime properties


来源:https://stackoverflow.com/questions/34301189/possible-to-stream-wav-file-to-windows-media-speechrecognition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!