L.R.
You'll need to investigate the real source much more. Carpet alone isn't the issue, so spraying and cleaning the carpet may never get the smell out; the padding beneath absorbs smells (and if it's urine, you need new carpet, period) and even the flooring -- even concrete! -- can hold smells in some cases. You feel sure this isn't urine but if it is, it can actually permeate the concrete or wood beneath carpet and pad and is pretty much impossible to get out.
You need to pull up the carpet and investigate. You may be able to get away with replacing the padding and keeping the carpet, but maybe not.
If this is mold rather than dog smells, you need to replace it all, immediately, as it's not just a smell issue, it's a health issue.
This is why I'm a huge fan of hardwood floors instead of carpet and padding. Much easier to keep clean and sanitary. If you have hardwood under the carpets, consider getting it refinished instead of replacing carpet -- today you can get hardwood redone at reasonable prices and with products that are "low-odor" and "low-chemical" so there aren't nasty chemicals in your air.
If you rent, your landlord needs to know that there may be a mold issue. I'd have a professional mold abatement company check the house (including inside walls, they have devices to detect mold pretty non-invasively) if this isn't a dog issue.
Are you 100 percent certain that a dog used to live in this house? You mention dog smell but don't say whether that's based on just how it smells to you or on knowledge that a dog or dogs actually lived there. What smells like wet dog to you could be water that created mold, or other mold smells.