I blot the carpet so it's not soaking, then sprinkle bicarb onto it. It dries it out and takes the smell. Treat it like shake'n'vac, let it dry then hoover it up.
Alternatively you can make a bicarb solution (hot water, slosh of bicarb - I've never been more scientific than that) but don't saturate the carpet. You need to dab at best, or you'll ruin it. A sopping wet carpet is really hard to dry properly.
Best of luck! In the event of total disaster, I've dabbed with white vinegar first, as the smell of vinegar is better than sick and lets you leave the carpet to dry for a while. But do open all the windows!