Search code examples
windows-servicestext-to-speech

Can a windows service speak via the text-to-speech API?


I have a project that would like to speak (text to speech, TTS) from inside a Windows service. I understand that no GUI is available inside a Windows service. Will the speech API work inside a service?


Solution

  • GUI is avaivable inside a Windows service. See SERVICE_INTERACTIVE_PROCESS in WinNT.h and this link. And yes, SAPI will work inside a service in the same way as it does in desktop apps.