This noise, which sounds like a long, drawn-out snort, is caused by a spasm of the soft palette.
During this spasm, the airway narrows making it hard for the dog to breathe.
It is more common in dogs with short muzzles, such as Shih Tzu, Chihuahuas, Bulldogs, and Boston Terriers.