I am using MS SAPI (5.1 or 5.3) to read a script using a call like this (in MS VC++):
Voice -> Speak(script.AllocSysString(), SPF_DEFAULT, NULL);
I want to be able to limit the total duration of the time spent reading the text to length X (hard limit). Is there a way to do that? I could put a character limit on the script string, but that's unreliable at best. I want to tell it to speak the script string and, if it's shorter than time X it will stop when done reading and continue execution, if it's longer than time X it will stop after reading time X worth of the script and continue execution.
Possible?