It sounds like there is something restricting its breathing. Did it eat anything such as a treat that part of it could have gotten caught in its airway? My Doberman sometimes hacks and then vomits when she eats her dinner too fast. 3 days ago it lasted for 2 hours. Try opening his/her mouth and blowing in it real fast and then rubbing its throat. I learned that trick as a child when I used to show dogs. It also could be some hair. If it gets worse call the vet just to be safe.
Wheezing in dogs is usually associated with allergies. Many foods can cause allergic reactions in some dogs. Some dogs have milk or dairy allergy. Drug allergy is also common in dogs. Pollens allergy, molds allergy, smoke allergy, flea allergy, insect bite, chemical allergy and many contact allergies can affect dogs. Asthma also causes wheezing in dogs.
So, take your dog to vet for proper diagnosis and treatment.
So, take your dog to vet for proper diagnosis and treatment.