Denise Carlson asked how a person could know when it is God who is speaking. My answer is
on how do you know if the person speaking to you is in fact God,
there isn't any single answer that covers all cases. However, if we assume the Bible generally speaking to be the Word of God, then we would know the following:
1) the true God is willing to be tested to be shown that He is the true God, I John 4:1-3;
2) the true God will in some cases give various kinds of "confirmation" that He is speaking, Judges 6 and elsewhere;
3) the true God will often speak to us by bringing to our attention or remembrance scripture verses or passages, John 14:26, but citing scripture is not sufficient to establish that the one speaking is God, see Luke 4:10; moreover, an ambiguous text should not be taken as a prooftext and a Bible verse, if cited in answer to a question, is usually insufficient if it leaves unexplained other Bible verses or indications that would seem to contradict the answer being drawn;
4) the true God will, if necessary, do miracles to prove His point or that He is speaking, Acts 1:1-3, Judges 6, I Kings 18:24, Exodus chapters 1-4, but miracles by themselves are not sufficient to prove that the one speaking is God, Dt 13:1-5, Mark 13:22;
5) messages which contradict or appear to contradict the Bible should be disbelieved or doubted until proven sound, Isaiah 8:20, Acts 17:11;
6) the long run fruit of the messages in the life of the persons believing them should be love, joy, peace, etc, Galatians 5:22, 23. Some believe that the fruit of the Spirit is also short-run test of the authenticity of a message being from God, but I am not convinced of that, partly because a lot of LDS missionaries claim that they feel love, joy and peace while testifying about or praying about the Book of Mormon and partly because I've known one or more others who've also made mistakes in the messages of God who make the identical claim;
7) the true God will at times tell the future, I Samuel 3 and John 16:13, but telling the future is not sufficient to establish that it is God who is speaking, Deut 13:1-5;
8) in the case of competing claims to be God established by miracles or by other means, the Bible gives us reason to believe that God will engage in contests with His opponents and will win, see Moses and the magicians of Egypt, see also Elijah and the prophets of Baal, see Jeremiah and the false prophets of his day;
9) God will speak with a wisdom that others cannot gainsay or resist, Luke 21:15;
10) I think that messages not from God will over time tend to contradict themselves or other information known to be reliable and that messages from God will over time be coherent.
Some messages from God to a person may be "established" simply by bringing a scripture verse or passage to that person's awareness. Other messages will be established only after a series of miracles or an experience such as Saul the persecutor had on the road to Damascus and further while in Damascus. I think that there are two basic rules to follow from the above:
for most Christians, a Bible verse or passage or a passage from a Christian biography consistent with the Bible "brought to mind," should be presumed to be a message from God unless there is good reason to believe otherwise;
other messages require sufficient confirmation to be proven of God, until a person by experience is able to recognize God's voice as being God's voice.
Sufficient confirmation or proof may vary from case to case, but in the final analysis, one's personal peace determines whether or not the proof is sufficient or additional proof and investigation is required. In some cases, I believe it is right to say, "God as best I can determine such-and-such is true; if I am wrong, you'll have to show me, but I have previously asked you to show me the truth, and this is the conclusion to which I have come."