With me it varies.
If there is plenty of room on a road or road+lane I usually just give lots of clearance and pass without words. If I feel like it I might exchange a "nice day." It is true some people actually get flustered having someone talk to them while passing.
With pedestrians on a path I use a bell that makes a single "ding." People I have asked have all agreed they like that warning. Sometimes I get a thumbs up. The MUP I sometimes ride on has signs posted that "require" bikes to give warning when passing.
When passing slower riders on the path generally rather than say "on the left" I tend to say "passing you on the left side." I think it is more explicit and is more often heard because it has more words and is conversational.
I like hearing from some one if they are passing. We all try to be careful but being sure doesn't hurt.
I have never had someone move left because I said "passing you on the left." I do have people who don't hear or are oblivious due to earplugs or being with other people. You just have to slow down, be tolerant, and consider getting onto a real road instead of a path. Bikers with earplugs who are not keeping right and in line are a much bigger problem than pedestrians.
Last edited by drat; 10-02-16 at 02:55 PM.