2 ms·
This little discussion got me curious about how hard it actually is to use COM interop with .NET. Using Visual Studio its just a right click on your dependencie
by Lariscus 6y ago
This little discussion got me curious about how hard it actually is to use COM interop with .NET.
Using Visual Studio its just a right click on your dependencies, selecting 'Add COM Reference...' and choosing the library you want to use.
I was then able to call SAPI very easily like this:
var voice = new SpeechLib.SpVoiceClass();
voice.Speak("Hello World!");
The documentation for SAPI could use some love though. The sample code that is supposed to be there is nowhere to be found.