> 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. # detect_answering_machine > Detect whether a human or an answering machine answered a call. [detect]: /docs/server-sdks/reference/python/relay/call/detect Detect a human versus an answering machine. A typed convenience over [`detect()`][detect] that builds the `{"type": "machine", "params": {...}}` configuration for you. All parameters are keyword-only, and only the ones you set are sent. ## Parameters **`initial_timeout`** `float | None` — default: None Seconds to wait for initial voice before deciding. --- **`end_silence_timeout`** `float | None` — default: None Seconds of silence that end the greeting. --- **`machine_voice_threshold`** `float | None` — default: None Seconds of continuous voice above which the greeting is treated as a machine. --- **`machine_words_threshold`** `int | None` — default: None Word count above which the greeting is treated as a machine. --- **`detect_interruptions`** `bool | None` — default: None When `True`, detect the caller interrupting during the machine greeting playback. --- **`detect_message_end`** `bool | None` — default: None Whether to keep listening for the end of a machine's message, so you can leave one after the beep. --- **`timeout`** `float | None` — default: None Maximum seconds to run the detector before stopping. Keyword-only. --- **`on_completed`** `Callable[[RelayEvent], Any] | None` — default: None Callback invoked when the operation reaches a terminal state. Can be a regular function or async coroutine. Keyword-only. --- ## Returns [`DetectAction`](/docs/server-sdks/reference/python/relay/actions) -- An action handle with `stop()` and `wait()` methods. It resolves on the first detection result. ## Example ```python {12-15} from signalwire.relay import RelayClient client = RelayClient( project="your-project-id", token="your-api-token", contexts=["default"], ) @client.on_call async def handle_call(call): await call.answer() action = await call.detect_answering_machine( detect_message_end=True, timeout=30, ) event = await action.wait() print("Detect result:", event.params) client.run() ``` > Detect whether a human or an answering machine answered a call.