Remove the window film or bubble wrap from the window, or open the blinds or curtains. Your dog will need to be able to see their usual barking trigger. As soon as your dog notices someone about to walk by, and BEFORE they bark, give them treats, one after another until the person is out of their sight again.