God has spoken in Scripture. He has given His general revelation to all. He has shown us what He sounds like there. So since God never leads contrary to what He has said in the Bible, when He speaks to us with specific direction we’ll know it is He who is speaking.
Let me just point out, God speaks to us in person!
But He doesn’t normally thunder from the heavens. He often speaks quietly, as if to see who is really listening and who really wants to hear. Sometimes when God speaks He will then in silence step back, waiting for us to come closer. It’s like a game of hide and seek that a father plays with his child, and it is a good way to lead someone in the direction they should go.
God speaks, steps back, and waits. His child comes closer. God moves and speaks again, and each time the child is closer to the Father. He rewards us for our obedience and desire to be near Him and to have a closer relationship. At the right time God reveals Himself to His children. Sometimes He’ll stand and smile, waiting with open arms. Sometimes He’ll pleasantly surprise us! Sometimes He’ll scoop us up in a hug! Then we’ll play some more.
Keep in mind this is not the only way God speaks, but it is one of the ways that I have noticed most recently. I have more to write (and to learn), but this is a good place to pause for now.