Wouldn't it be more efficient to sense the speedometer for speed and adjust the volume accordingly. I would go crazy if the volume went up and down when passing large trucks. What to think about railroad crossings?

Good points, it probably makes more sense to connect it to the speedometer, except that's likely to be much more vehicle specific and require some additional hardware (I'm sure some people on this board can come up with something like this while brushing their teeth). Just hooking up the mike should be much easier from the installation point of view. If it reacts really slowly (say 1db/10sec) then it won't be affected by temporary changes in noise level yet still adjust properly when getting on/off the highway etc.

It would be sufficient for me if the volume goes down when stopping in front of a traffic-light (it would stop people staring and pointing to their heads)

Hasn't happened to me yet, I probably need to turn up the gains on my amp.