No, God does not speak to a person through a voice in their head. The Bible teaches that God does not speak in a person’s head. In the Bible, Isaiah 30:21 says:
And thine ears shall hear a word behind thee, saying, This is the way, walk ye in it, when ye turn to the right hand, and when ye turn to the left.
The expression “thine ears shall hear a word behind thee” in the verse above refers to a human remembering of a message from God from an external (environmental) source (such as the Bible) that one has previously heard or read or an inference or conclusion of the human mind based on one or more such previously heard or read messages.