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.
This breath of life also apparently gave Adam the ability to walk, talk, name creatures, build a garden, and be attracted to women.