How did Adam, and then Eve, learn to speak?
By being made in the image of God, God granted man one of his attributes- namely the ability to communicate. As a God in communion and relationship with himself ("let us create man in our image Gen 1.26) the power of speech and language would have been understood to merely be part of that Imago Dei.
Furthermore, the fact that Adam was given the job of naming the animals indicates that God had given Adam the power of speech.
The Paley hypothesis, popular in the 1800s suggested that God created creatures fully adult like, so God creating a speaking Adam would have been perfectly natural.
It says that God breathed into the human Adam the breath of life. Since there's no explanation of how that worked, one can only infer from a lack of detail that within this "breath" came all the necessary components that Adam needed for living, including speech.
Gen 2:7 (ESV) ...then the Lord God formed the man of dust from the ground and breathed into his nostrils the breath of life, and the man became a living creature.
This breath of life also apparently gave Adam the ability to walk, talk, name creatures, build a garden, and be attracted to women.
- Gen 2:15 (ESV) The Lord God took the man and put him in the garden of Eden to work it and keep it.
- Gen 2:19 (ESV) Now out of the ground the Lord God had formed every beast of the field and every bird of the heavens and brought them to the man to see what he would call them. And whatever the man called every living creature, that was its name.
- Gen 2:23 (ESV) Then the man said, “This at last is bone of my bones and flesh of my flesh; she shall be called Woman, because she was taken out of Man.”