When God speaks to us it is always to our hearts (spirit) not our mind in our head. This is where people get pretty confused and led astray by following voices. The "spirit" of man is the "candle" of the Lord........(Pro 20:27) The Lord shall light my candle, the Lord shall illuminate my darkness...(Psa 18:28)
The Devil can and does speak to our minds, which is usually very unclean thoughts. These thoughts are not yours, and the only way to get rid of them is by speaking the Word of God out of your mouth. Renewing your mind (physical mind) is very important to every Christain, without which we will continually be bombarded with bad thoughts.
Rom 12:1 I beseech you therefore, brethren, by the mercies of God, that ye present your bodies a living sacrifice, holy, acceptable unto God, which is your reasonable service.
Rom 12:2 And be not conformed to this world: but be ye transformed by the renewing of your mind, that ye may prove what is that good, and acceptable, and perfect, will of God.
The Devil has no idea what you are thinking. The only way he can find what you are thinking is when you speak it of your mouth. We are told to cast down every imagination, and every high thing that tries to exalt itself against the knowledge of God....
2Co 10:4 For the weapons of our warfare are not carnal, but mighty through God to the pulling down of strongholds;
2Co 10:5 Casting down imaginations, and every high thing that exalteth itself against the knowledge of God, and bringing into captivity every thought to the obedience of Christ;
This might seem impossible at first, but all things are possible with God.