Can SDL output windows text-to-speech SAPI5 voice?

Given a string of text, is it possible to call microsoft text-to-speech engine to output voice through SDL? If so, which command does one use? Also, is it possible to track the progress of text-to-speech in real time through SDL?

Not “through” SDL, I would expect, but I can see no reason why you should not call the SAPI5 APIs directly from your app, bypassing SDL completely.

SAPI5 is a COM interface so in C you will be wanting to create an SpVoice object using the CoCreateInstance() API with the CLSID_SpVoice class ID and IID_ISpVoice interface ID.

1 Like

@rtrussell I see! Thank you for your reply. For some reason I thought the text-to-speech functionality would be extremely low level by default. Good to know that there is a convenient API!