Get a good microphone and a pregnant lady. Try to monitor her baby's heartbeat with that. You will need lots of signal processing to filter out things like a growling tummy or some other sounds originating there without missing a beat, but that's definitely doable. You should then have a model of how the heartbeat sounds and how to distinguish it from other sounds.
Next, try the same thing with the bad microphones on the lady's tummy. If you compare the data you have from the good mic, you can form a model of the distortion and shortcomings of the bad one and try to filter them out. If you want a generalized algorithm to do this without calibration, that kind of "learns" how the mic you have at hand performs this is going to be a bit of work there.
It sounds easy, but this kind of thing always does sound like that at first sight. As you go, you will see that almost everything is a headache if you want it to work reliably.
Also, you need, as one of the first things, to properly describe what your system is supposed to do, by which means, and under what circumstances. Can you assume a certain microphone quality? Can you assume a certain placement of the microphone? Can you assume a certain volume of the baby's heartbeat? Do you need to consider ambient noise? What kind of ambient noise? Does the user have to stay still?
Don't be overly optimistic with your idea. There's a lot of really good ideas in the area of "I take some sensors and..." that simply don't work because the people having them misjudge what's possible and what is not. Don't be discouraged, though, as quite some ideas have been touted totally impossible by experts, then went into production. But in those cases there was usually a lot of sweat, tears and brains involved. And you can't know if you're fighting against windmills or not unless you succeed

What might help is trying to to take an information theory based approach and see if the information you want to get out of the signals you have is actually in there. For a baby heart rate monitor that's pretty obvious. If you take the microphone and listen to it on headphones and can count the heart rate yourself, the information must be in the signal. It's now just building something that works roughly as good as your brain in that respect - which is hard enough.
Your earlier example is much more complex in that regard and the answer there is likely that the information you want is not going to be extractable from your sensor readings with high enough certainty.
Edit: Depends on your idea and how complex it is. Anywhere from maybe a hundred bucks for someone to tell you he read some recent paper in an open access journal that describes exactly what you want and has some example software up to an unbounded sum.
Edit2: I thought a bit about your baby heartrate example while in the shower and came up with something that might be a further example. If you want to monitor heart rate, you should e.g. realize that the signal you want to receive has a couple of constraints that can be exploited.
Measurements are not independent. If you hear a heartbeat, you can rule to hear another one within a certain time frame and need to hear another one within a certain time frame. That's because the heart rate is bounded somewhere, though I have no idea what the limits are for fetuses. I'm just sure you don't get anything in excess of 300 and below 30.
They're probably also not just dependent in a first-order way. There's probably also a limit in how fast the heart rate changes typically. So if you have measured two heartbeats that are correspond to 80 beats per minute, the next one can't have a distance to the last one equal to 300bpm or 30bpm, but has to lie somewhere in between 55 and 140bpm.
These are things you need to find out and model appropriately, because just trying to find a heartbeat by audio signature will not work good enough. The question how you handle this then will need further details, like e.g. a model for the change in heart rate. If there's a gaussian probability distribution for the next heartbeat within the range you define in your model (above 55 and 140 in the example) you could push a Kalman filter or something derived from that onto the problem, because it's based on the assumption that deviations from the prediction follow a gaussian distribution.
But these kinds of things are why I suggested you get someone to describe and solve the problem in an abstract way before trying to code. You first need to know how your hole should look and what kind of shovel you need before digging.