Programmatically importing MS Speech API speech pr

2020-06-06 20:14发布

问题:

I have a Windows 7 computer trained to my voice, and I would like to distribute my speech profile along with a software package I have created.

I know of tools such as WSRProfile.exe (http://www.microsoft.com/download/en/details.aspx?id=16296), which allow one to save and load new speech profiles.

However, is there a away to implement this in my own code (C#), without requiring any external tools or applications?

Thanks in advance.

回答1:

You can follow the procedure described here: http://blogs.msdn.com/b/robch/archive/2007/02/19/transfering-profiles-programatically.aspx

Basically, to programmatically import profiles, you will need to create some registry keys and to copy/rename previously saved files. The explanation uses the C++ version of SAPI but the procedure is surely valid for C# version.