The Bible is filled with instances that present themselves as direct quotes from God. For example: Gen 6:7 “and the Lord said”. There are four possibilities of what this phrase could mean:
1. This is a direct quote from God. God said these literal words.
2. This is the author paraphrasing God (just as the authors of the four gospels paraphrase Jesus’ sermons). This would not be saying God did not say anything, just that this summarizes what God did say.
3. This is a literary devise by the author to express what God is feeling. If God was sad, the text would read “And God said, ‘I am sad’.”
4. The text does not mean in any way what it expresses and is in error. The Calvinists take this position when they say God saying he “repented” is just a way to placate uneducated readers.
For 1 and 2 (and even 3), the question should be “how did the author gain this information?” How did Moses know what to write in Genesis? Did God implant it into his mind? Did God sit him down and speak to him?
We see Moses conversing with God on Mount Sinai (Exo 19) and during the burning bush incident (Exo 3). We do not have evidence of Moses just hearing voices in his head or just “knowing” what is true. We would best assume that Genesis was dictated to Moses by God (just as the writing of the Ten Commandments). If the events in Genesis were passed on to Moses by man, this would cast doubt on the accuracy of the Bible (as for physical evidence that Genesis reflects truth, see carbon in diamonds and dinosaur soft tissue). We can extrapolate that the later prophets also experienced God in the same way (take Samuel for example).
If someone wants to be a Christian, the natural position on quotes by God is that they fall under either category 1 or 2. God is actually speaking.