In 1 Kings 8:22 Solomon prays before “all the congregation of Israel”. If we were to take this phrase literally, we might imagine Solomon straining to be heard by hundreds of thousands of people.
In fact, the composition of this congregation is carefully explained in v1: it was made up of the elders of Israel and the leaders of the tribes. So we are not talking about ALL the Israelites but their representatives. Solomon prayed before these representatives and, no doubt, they carried his message back to their tribes. Therefore there is no difficulty regarding his voice being heard.
As a side note, the human voice can carry quite far, depending on conditions (i.e. wind, acoustics, etc.). See here.