> ## Documentation Index
> Fetch the complete documentation index at: https://gladia-95-jl-ml-93-amd-docs-clean.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Answering Machine Detection

> Know within seconds whether a human or a voicemail picked up

Answering machine detection tells you whether the person you called picked up, or whether you reached a voicemail greeting.

The decision arrives about five seconds after the person you called starts speaking, without waiting for a transcript, so an outbound agent can act on it immediately.

### The message

You receive an `answering_machine` message at most once per session:

```json theme={"system"}
{
  "session_id": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2026-09-09T12:34:11Z",
  "type": "answering_machine",
  "data": {
    "kind": "machine",
    "confidence": 0.78,
    "time": 5.24,
    "channel": 0
  }
}
```

| Field        | Meaning                                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------------------- |
| `kind`       | `human` or `machine`                                                                                    |
| `confidence` | Score between 0 and 1 indicating how machine-like the call opening was                                  |
| `time`       | Position in the audio stream, in seconds from the start of the session, at which the decision was taken |
| `channel`    | Audio channel index the decision applies to                                                             |

<Note>
  `time` is measured on the **audio timeline**, not the clock. It uses the same reference as `speech_start`, `speech_end` and `transcript`, so you can order all of them against each other. If you push audio faster than real time, `time` still refers to the audio position, so use `created_at` when you need to correlate with your own logs.
</Note>

<Warning>
  `confidence` is a **ranking score, not a probability**. A value of `0.7` does not mean "70% chance this is a machine". Use it to compare against a threshold you tune on your own traffic, not as a calibrated likelihood.
</Warning>

### Acting on it

Most callers act on `kind` directly:

* **`machine`** — hang up and queue the number for a later attempt, or stay silent and let the greeting finish before leaving a recorded message.
* **`human`** — start the conversation.

If you want to be more conservative than the default, read `confidence` and require a high score before treating a call as a machine. Hanging up on a real person usually costs more than a few wasted seconds on a voicemail, so a threshold above the default is a common choice.

### Timing and edge cases

The decision fires **at most once per session** and is never revised. Later audio does not change it.

* **The window starts at the first speech.** Ringing, connection delay and any leading silence do not count. The decision is taken once five seconds of audio have been heard after that first speech.
* **Nobody speaks at all.** No message is emitted: silence never starts the window and is not evidence of a machine. Apply your own timeout if you need to give up on a silent line.
* **Very short calls.** If the session ends before the five seconds have elapsed, no message is emitted.
* **Transcripts are not ordered against it.** Partial or final transcripts may arrive before the decision.
* **No transcription required.** The detection does not depend on what was said, so it behaves the same across languages and adds no transcription latency.

### Limits

Detection is tuned for the opening of an outbound call. It is not designed to detect an answering machine that picks up mid-conversation, and it does not attempt to identify IVR menus or hold music.
