How do I know when playing audio from Speechbackground is do

I’m working on the Asterisk plugin for ASR (Automatic Speech Recognition).
How do I know from within the plugin that playing audio from “SpeechBackground” is done?
I would like start no input timer as soon as playing the audio is done. Any idea ?