
This could be a fear/stress response. Around 9 months could have been the start of his second fear period, in which dogs can become reactive to things that they weren't previously - my last pup went from absolutely fine with other dogs to totally fearful of them literally overnight, with no trigger, when she hit hers.
Ignoring won't help, whether he's worried or just doing it for fun; if he's worried, he'll just continue to be worried and if he's doing it for fun, barking is an incredibly rewarding thing for many dogs so he'll just do it more! Also, if it is fun now and you start correcting it every time, you run a high risk of turning it into a stress response as he could associate the correction with whatever he's barking at. Yapping like this can be a tricky one!
Ideally I would recommend getting a decent behaviourist to help you as they will determine which it is first of all, and then prescribe appropriate techniques to stop him. In the meantime, try to distract him when he starts (or even better, just before) then reward him for stopping - you'll need really high value stuff for this (meat, cheese, that sort of thing). I would also recommend trying this method:
http://www.clickertraining.com/reducing-leash-reactivity-the-engage-disengage-gameTiming is important - in that first stage you have to mark him (the click, or whatever you use to mark a good behaviour) the *instant* he spots whatever he normally barks at. But get it right, and it is a hugely effective tool for reactive dogs, whatever the reason behind those reactions. I use it in my fearful dogs and I have my clients do it, it really is brilliant. It was the very first thing I did with my fearful newbie and it calmed her down very quickly.