smoke alarm chirp

How do smoke alarms detect battery levels and know when to chirp?

There’s probably some sort of circuit on the board that meter the voltage the battery puts out. When it gets low enough, it fills a capacitor or something that, when filled after a minute or so, will discharge into the horn, causing a chirp.
That’s just my guess.