I can speak for the B744.
The "voice callouts" are based on a radar altimeter, the antenna of which are somewhere near the main gear. There are two separate systems, one for the F/O and one for the grumpy old fart. Both are required for Cat III low vis ops (maybe Cat II, but can't remember). The actual distance is displayed on both pilots PFDs, but only when below 2500AGL.
I believe the heights that are called out are a customer option, our airline has 100, 50 and 30.
On the ground the reading usually shows as -8 feet. Dunno why.
The radar altimeter also provides inputs to the GPWS (ground prox warning system) for voice warnings such as "too low, flap", "too low, gear" and "terrain, terrain".