How to determine the sex of an unborn baby?

Note: The subject of this question may be sensitive to some readers, so I request answers to be tactful and stay strictly in the scope and context of Dungeons & Dragons RPG.

We have a human female NPC who is pregnant in our campaign. Most importantly we’d like to find out the sex of the baby. Other stuff like, is it twins/triplets, is the father who we think it is (a human too), and what the "race" of the baby is (I mean, it could be a tiefling even if both parents are human), is of course a bonus.

What methods (probably spells and magic items, maybe a medicine check somehow) are available in the official books?

I’ve been thinking of an (ab)use of Locate Creature spell, but it seems a bit iffy to consider an unborn baby boy/girl as "the nearest creature of a specific kind (such as a human or a unicorn)"