This will depend upon your country of residence (and possibly even a region within that country). And, rather than being specifically targeted at excessive barking, it is likely to be general legislation targeting anti-social noise levels. For example, in the UK it is the Environmental Protection Act 1990. If the relevant body establishes that the noise level is excessive they will require the person responsible to stop it - if they don't then they can be prosecuted and fines can be imposed.