The spell Speak with Dead says, in part:
You grant the semblance of life and intelligence to a corpse of your choice within range, allowing it to answer the questions you pose. The corpse must still have a mouth and can't be undead.
This accepted answer says that skeletons don't count as corpses based on other uses of the terms. While some of this gets into semantics (and this is magic, not strict biology) it's possible the intent of the spell is that the head physically speaks to you, based on what it knew in life.
What if the lower jaw was missing from the corpse, or perhaps the tongue was missing? Both of those would be sufficient to keep a living creature from talking, so it's possible that it would keep a corpse from talking as well. OTOH this is magic.
While this could be up to DM fiat, I (as a DM) am much more comfortable with a supported answer, either based on similar spells or designer conversations.