The story I heard goes like this.. The ruler did this by putting several children in solitary confinement from birth. The children only saw humans when absolutely necessary and they were never spoken to. This was supposed to create a "true voice of God" in the children, as they theoretically would only have interacted with God.
A quick google search didn't yield any results. Did this actually happen? What became of the children if so?
I'm not so sure about the "voice of God" framing, but there are several accounts of experiments to determine the original language of humanity by isolating infants and seeing what language they spoke naturally.
The earliest such account of which I'm aware is found in Herodotus' Histories. In the story, which Herodotus would presumably have heard from local sources during his research trip to Egypt, the Pharaoh Psammetichus (i.e., Psamtik I, r. 664-10 BCE) ordered that two newborns be given to a goatherd, who was to raise them in isolation and never speak to them. After two years, the goatherd reported that one of the infants had said "bekos." Psammetichus learned that this sounded like the Phrygian word for bread, so he concluded that the Phrygians (not the Egyptians) were the oldest people.
Subsequently the 13th century chronicler Salimbene wrote that the cosmopolitan Emperor Frederick II (r. 1220-50) conducted a similar experiment by ordering women to raise babies without talking to them. This resulted in the deaths of the babies, who " could not live without clappings of the hands, and gestures, and gladness of countenance, and blandishments." Salimbene specifically compared this alleged experiment to that reported by Herodotus. He included it in a list of vain, gruesome experiments allegedly conducted by Frederick.
Chronicler Robert Lindsay of Piscottie credited James IV of Scotland (r. 1488-1513) with conducting a similar experiment by having a mute nurse raise two babies on an small island. Lindsay reported that some people said the children spoke good Hebrew (a perennial candidate among medieval Christians for "world's oldest language") but he did not know the truth of this himself. Sir Walter Scott, compiling his own history of Scotland centuries later, suggested, "It is more likely they would scream like their dumb nurse, or bleat like the goats and sheep on the island."
It seems likely none of these experiments actually happened. The medieval accounts were colored by knowledge of Herodotus. It became something of a trope that a ruler with nothing better to do would try to determine the true original language through a language deprivation experiment.
Bookending this somewhat, the Enlightenment philosopher Montesquieu (1689-1755) suggested that some wise and inquisitive rule ought to isolate some children and see what kind of language they develop and otherwise use the experiment to determine what sort of society is natural. This overlapped somewhat with the idea of feral children (i.e., children growing up without human contact due to misfortune and "raised by wolves" or something like that) who were also thought to give insight into the natural state of humanity. The idea of a conscious experiment was novelized during this period by Gaspard Guillard de Beaurieu, L'eleve de la nature (1761), later made into a successful melodrama.
In none of the accounts I've read was the language the children would spontaneously speak credited to "speaking to God." Rather it would just be some kind of natural phenomenon.
Apologies, but we have removed your question in its current form as it breaks our rules concerning the scope of questions. However, it might be that an altered version of your question would fit within our rules, and we encourage you to reword your question to fit the rule. While we do allow questions which ask about general topics without specific bounding by time or space, we do ask that they be clearly phrased and presented in a way that can be answered by an individual historian focusing on only one example which they can write about in good detail.
So for example, if you wanted to ask, "Have people always rebelled against health rules in pandemics?" we would remove the question. As phrased, it asks broadly about many places collectively. However if you ask "In the time and place you study, how did people rebel against health rules in a pandemic?" we would allow the question. As phrased, while still asking broadly, it does so in a way that clearly invites a given expert to write exclusively about their topic of focus! We encourage you to think about rewording your question to fit this rule, and thank you for your understanding. If you are unsure of how best to reshape your question to fit these requirements, please reach out to us for assistance.