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.156and an optimal threshold of0.452, plus a ready-to-useinference.pyscript 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
AmdDetectorclass 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 more
DetailsTest 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.










Comments