I don't tend to say anything. If I am on a shared use path I just wait behind pedestrians if there is no safe way to overtake, if necessary get off the bike and walk behind them. The click of unclipping sometimes alerts them to my presence and they move aside to let me past. With horse riders, I tend to maintain some distance between myself and the horse, the rider often sees me at some point, but if not, I just wait for a decent overtaking opportunity and pull right out to the right side of the road and overtake carefully. No different to when I am driving a car. In the rare situation the horse looks spooked I dismount, stand up and say something in an attempt to identify myself as a harmless human to the horse. I used to attempt to make my presence known to pedestrians with a subtle ting of the bell or a polite greeting, but found it was a waste of time, most people are wrapped up in their private universe which only extends half a meter from their body, so the greeting was mostly ignored. If they are using a smartphone, then I don't exist.