Wearing headsets, 18 subjects lay quietly while a functional magnetic resonance imaging machine (fMRI) droned on around their heads.
They listened as a female voice recited a famous line from a cherished children's book, "The Little Prince."
"It is only in the heart that one can see rightly; what is essential is invisible to the eye," the soft voice said, first in Spanish, then in Hungarian.
Then the voice began to recite a series of nonsense words.
Two of the 18 subjects were familiar with Spanish but had never heard the language of Hungary. The other 16 were well-versed in Hungarian, but had never heard Spanish. Nonsense words were, of course, gobbeldygook, unfamiliar to any of the subjects.
It was all an experiment designed to see where and how the brain would light up when exposed to familiar versus unfamiliar languages, or natural speech versus scrambled speech.
The result? Sure enough, the brain scans showed different activity patterns in the primary auditory cortex when nonsense words were spoken than when natural speech occurred. It also showed unique areas of the brain became active when an unknown language was spoken versus when familiar speech was heard.
Those results may be not at all surprising — until you realize that the 18 subjects were dogs.
"The interesting thing here is that there was a difference in the (dogs') brain response to the familiar and the unfamiliar language," said Attila Andics, head of the department of ethology (the study of animals) at Eötvös Loránd University in Budapest, Hungary, who led the experiment.
"This is the first nonprimate species for which we could show spontaneous language ability — the first time we could localize it and see where in the brain this combination of two languages takes place," Andics said.
A move across continents
The idea began when neuroethologist Laura Cuaya moved from Mexico to Budapest with her dog, Kun-kun, a border collie.
"I had only talked to Kun-kun in Spanish," said Cuaya, who is a postdoctoral fellow in animal studies at Eötvös Loránd. "I wondered whether he could detect a different language."
Cuaya and her co-authors designed a study to find out. They gathered five golden retrievers, six border collies, two Australian shepherds, one labradoodle, one cocker spaniel and three dogs of mixed ancestry, all of which were between 3 and 11 years old and had been previously trained to remain still inside an MRI scanner.
"It's important to mention that all the dogs are free to leave the scanner at any point," she said, adding that the owners were present and the dogs "are comfortable and happy."
They found that the dogs had much stronger brain activity in the auditory cortex for nonsense words than natural speech, regardless of the language that was spoken.
When it came to distinguishing between different languages, however, the researchers found the brain lit up in an entirely different, more complex region of the brain — the secondary auditory cortex.
"Each language is characterized by a variety of auditory regularities. Our findings suggest that during their lives with humans, dogs pick up on the auditory regularities of the language they are exposed to," said co-author Raúl Hernández-Pérez, a postdoctoral fellow in the animal research department at Eötvös Loránd University, in a statement.
"This is actually pretty similar to what we see with very young preverbal infants who can differentiate between languages spontaneously before they start to speak," Andics told CNN.
And practice makes perfect, it seems. The older the dog, the better its brain distinguished between the familiar and the unfamiliar language.
"In earlier research, we found that not only how we say things, but what we say matters," Andics said, explaining that dogs could tell the difference between familiar phrases even when they were spoken in the same tone and manner.
"We saw that some words are indeed processed independently of intonation," he said. "Both how we say it and what we say matters.
"It is actually a very exciting follow-up research question whether the thousands of years of domestication gave dogs some advantage for speech processing," Andics added.