Some screen-reader APIs, like NVDA, provide no way to tell when the screen-reader has finished speaking. I finally sat down and thought about this with regards to TDV and screen-reader support: how can we provide a halt mechanism for these screen-readers? My mind went back to Lone Wolf from GMA which was probably the first game to ever achieve a "speech delay" as they called it: they would have the screen-reader speak a piece of text, and based on how long it would take, they could then make an educated guess as to the words-per-minute count.
I've taken this approach in TDV (code which I haven't pushed yet, but will soon for anyone who would like to look at it.)
While this method works rather well (surprisingly well, in fact,) it does have its flaws. For example, since it's based on empirical data, if the user changes their speech rate, the test has to be run again.
Also, this method isn't 100% reliable: sometimes the game pauses too long, sometimes not enough. These variations are based on pauses in the screen-reader's speech and, although minimal with respect to the amount of error, still make the game feel like it can be refined a bit.
Has anyone else had experience with setting speech delays? Or is that unless NVAccess themselves decide to write an isSpeaking function, this is the best way to estimate a pause time for NVDA?