I generally don't say anything. As previously noted, people with earbuds or carrying on conversations are generally unreachable. In congested areas I pay close attention to the pedestrians and don't pass until I'm relatively sure of their trajectory. When someone ahead is hogging the whole path, I pull up behind them, slow down and loudly say "Excuse me." That usually works.