Skip to content
Audio

AIAMD

fast answering machine detection in the first seconds of a call

3 min readupdated

AIAMD (Answering Machine Detection) is a compact audio model by kugu that identifies who picked up an outbound call: a live human or an answering machine (voicemail, voice assistant, IVR menu, or network tones). It analyzes the first 3 seconds of audio and updates the probability of a machine on the line every 0.48 seconds, letting you decide while the call is still connecting. Under the hood, it combines a frozen YAMNet feature extractor with a lightweight GRU (Gated Recurrent Unit) recurrent network with just 44,657 trainable parameters, implementing the paper by Altwlkany et al. (2024). It is built for developers working on auto-dialers, call centers, and voice bots.

Key features

  • Real-time streaming inference: outputs the p(machine) probability every 0.48 seconds, letting you drop or reroute a call before the greeting even finishes.
  • Ultra-lightweight architecture: runs a compact Dense(32) → GRU(48) → Dense(1) head with 44.6k parameters on top of a frozen YAMNet backbone, requiring no heavy GPU.
  • Out-of-the-box calibration: the repository includes a calibration file with a temperature of 1.156 and an optimal threshold of 0.452, plus a ready-to-use inference.py script with full preprocessing.
  • Resilient to silence and clip length: random background-noise pauses were added to both classes during training so the model does not rely on audio duration as a shortcut.

What you can do

  • Filter auto-dialer traffic: cut off voicemails and network tones within 1–2 seconds of pickup so you don't waste human agent time or expensive voice LLM tokens.
  • Route voice bots dynamically: switch a bot's flow straight to leaving a message as soon as the model flags voicemail with high confidence.
  • Recalibrate for your own telephony: take the ready-made AmdDetector class and tune the decision threshold to match the false-positive trade-off on your specific lines.

Example

from inference import AmdDetector

detector = AmdDetector()
result = detector.predict(samples, sample_rate)
# {"decision": "machine", "p_machine": 0.99, "threshold": 0.452, ...}
Read moreDetails
Test metrics (at 0.452 threshold): Balanced accuracy — 0.963, AUC — 0.993, human recall — 0.962, machine recall — 0.963 (and 0.965 on a 7,000-recording holdout set).
Accuracy by listening window: 0.868 at 0.98 s, 0.940 at 1.94 s, and 0.965 at 2.90 s.
Performs best on standard voicemail (0.974) and network tones (0.955), while custom greetings and short name-only answers are harder (~0.86–0.89).
Limitations: built strictly for 8 kHz telephony audio up to 3 s long; requiring 99% human recall drops machine detection rate to ~73%, and training on a single-channel dataset means accuracy may dip on different telephony setups.
Discuss Telegram 0 15

Will it run?

Working out the memory needs

The bot is still collecting this model's weight sizes; the estimate will appear here in a few minutes. Meanwhile you can rent a GPU with headroom.

Massed ComputeOpen Massed Compute

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # kugu/AIAMD
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download kugu/AIAMD --local-dir ~/models/AIAMD
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to AIAMD
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of AIAMD (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

kugu/AIAMD
Author
kugu
Category
Audio
Released
Posted

On NeyroLearn

Hugging Face

150

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments