You can limit the maximum duration of speech recognized in a GetInput XML execution through the executionTimeout parameter of GetInput XML. 


Note that a maximum of 60 seconds of speech can be recognized in one execution of GetInput XML.


To learn more about Speech Recognition related timeouts, check out the detailed reference documentation here.