find out wehn NVDA has finished speaking a given text

Stefan Moisei

I understand that, from 19.3, the new speech api allows implementing callbacks triggered when speech has finished. I read the comments for the speech functions and the phonetic punctuation addon, but I didn’t really get it. Can anyone redirect me to a simple example? I want to do a ui.message, find out when it finished speaking, and then do something else.