If it's when they are slowing down it's likely the jake-brakes j-brakes you are hearing especially if they have straight pipes. Diesel engines don't have engine braking by design so a mechanism was added to the heads to create artificial engine braking that can be toggled on per head.
[ Edit for clarification: ] I have created some confusion with this statement. For clarification diesel engines never had engine braking due to the lack of a throttle plate but this has been worked around with add-ons using different techniques. On a big-rig this is jake-brakes. On smaller modern vehicles this is usually a small turbo or an exhaust baffle. The operator of a modern diesel vehicle will effectively experience engine braking when they let off the throttle. On older diesel pickups and cars there was no engine braking.
[ Edit for clarification: ] I have created some confusion with this statement. For clarification diesel engines never had engine braking due to the lack of a throttle plate but this has been worked around with add-ons using different techniques. On a big-rig this is jake-brakes. On smaller modern vehicles this is usually a small turbo or an exhaust baffle. The operator of a modern diesel vehicle will effectively experience engine braking when they let off the throttle. On older diesel pickups and cars there was no engine braking.