There are certain people in your life whose voice you could recognize anywhere. For most people, you could be in a crowded mall, but if your mom calls you by your full name from across the room, your ear is going to pick up the sound immediately. You wouldn’t be able to do that same trick with someone you just met. It took years of being around that voice and becoming familiar with it in order to do always recognize it.
If you want to hear and recognize God’s voice in your life, you’ve got to spend time around Him. The best way to know what God sounds like is to read his word. The Bible is his word. It’s breathed out by God. The more time you spend with scripture the easier it will be to spot God’s voice during times of prayer.