> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # setSpeechEventTimeout > Adjust the speech event timeout for noisy environments. [set-end-of-speech-timeout]: /docs/server-sdks/reference/typescript/agents/function-result/set-end-of-speech-timeout [functionresult]: /docs/server-sdks/reference/typescript/agents/function-result Adjust the speech event timeout. This controls how many milliseconds since the last speech detection event to wait before finalizing recognition. This timeout works better than [`setEndOfSpeechTimeout()`][set-end-of-speech-timeout] in noisy environments. ## **Parameters** **`milliseconds`** `number` — required Timeout in milliseconds. --- ## **Returns** [`FunctionResult`][functionresult] -- `this`, for chaining. ## **Example** ```typescript {4} import { FunctionResult } from '@signalwire/sdk'; const result = new FunctionResult() .setSpeechEventTimeout(2000); ``` > Adjust the speech event timeout for noisy environments.