I am a very loud person, and am not always aware of how loud. I'm sure that I have said such a thing in a situation, probably in a busy street at one point, where many people have heard me.
If you heard someone saying something in a joking manner to their friend in public, however many people hear, you might think they were dumb for being so loud, but not so much that they deserved any more punishment than being told to quieten down/move along.