The Holy Spirit guided the people of the Bible. These people heard God. Many people don't understand this. When we read the Bible; we should know that the Holy Spirit wrote the Bible.
2 Peter 1:20-21
20 Above all, you must understand that no prophecy of Scripture came about by the prophet’s own interpretation of things.21 For prophecy never had its origin in the human will, but prophets, though human, spoke from God as they were carried along by the Holy Spirit.