Search code examples
c++text-to-speechsapinvda

Debug sapi5 text to speech engine


I'm currently working on a TTS engine and my job is to make it compatible with Microsoft SAPI5. I followed the tutorial here a long with the SAPI sample projects and successfully built the engine dll. I registered the dll with regsvr32 and attached the voice into registry. However when an application (NVDA screen reader in my case) called my engine, I got the error (from NVDA log)

COMError: (-2147221164, 'Class not registered', (None, None, None, 0, None))

I obviously have done something wrong with the engine but I have no idea how I might debug this.


Solution

  • According to SAPI sample, in the idl file declared a library (with libid) and my engine class (with clsid), then there is a .rgs file which in turn will register the engine into registry, in my problem I did misplace the clsid with the libid, hence the engine is not registered properly.