Your dog gets excited and wags his tail when you say "good boy!" and "treat!" and maybe even "Want to go for a walk?!"

But is it the words he understands or the lilt and obvious happiness he picks up in your voice?

Researchers in Hungary say that dogs understand both the meaning of the words we say, as well as the tone we use when we speak them. So even if you say, "I'm going to work!" in your most upbeat, cheery voice, there's a good chance your dog is going to see right through you and know this isn't good news.

"During speech processing, there is a well-known distribution of labor in the human brain," said lead researcher Attila Andics from Eötvös Loránd University, Budapest, in a statement. "It is mainly the left hemisphere’s job to process word meaning, and the right hemisphere’s job to process intonation."

The study, published in the journal Science, found that praise activates the reward center in the brain only when both the words and the intonation are in sync.

dogs in MRI scanner Dogs in Hungary sit around the MRI scanner used to measure their brain activity. (Photo: Enikő Kubinyi)

Researchers trained 13 dogs — mostly border collies and golden retrievers — to lie quietly in a harness in a functional MRI machine while the machine recorded the dogs' brain activity. A trainer who was familiar to the dogs spoke various words to them with either praising or neutral intonations. Sometimes she said praising words that were often heard by the dogs from their owners, such as "well done!" and "clever!" and other times she used neutral words that the dogs likely didn't understand, which the researchers believed meant nothing to the pets.

The dogs processed the familiar words using the left hemisphere of their brains, no matter how they were spoken. And tone was analyzed in the right hemisphere. But positive words spoken in a praising tone prompted the most activity in the reward center of the brain.

So "good boy!" said in a positive tone got the best response, while "good boy" in a neutral tone got the same response as a word like "however" said in either a positive or neutral way.

“It shows that for dogs, a praise can very well work as a reward, but it works best if both the words and the intonation are praising," Andics said. "So dogs not only tell apart what we say and how we say it, but they can also combine the two, for a correct interpretation of what those words really meant. Again, this is very similar to what human brains do.”

What this means for us is that humans aren't so unusual when it comes to how our brains and language work together.

“Our research sheds new light on the emergence of words during language evolution," said Andics. "What makes words uniquely human is not a special neural capacity, but our invention of using them."

Here's a video of the researchers explaining how the whole thing works:

Words they know and words they don't

In a somewhat similar 2018 study, researchers at Atlanta's Emory University studied how various parts of a dog's brain reacted when hearing words they know versus those they don't.

While in an MRI machine, dogs were shown toys they recognized as the toys' names were spoken. Then the dogs' owners said gibberish words that the dogs had never heard before. Researchers found that the dogs had greater activity in the auditory regions of the brain when they heard the pseudowords versus when they heard the words they already knew.

The researchers hypothesize that the dogs may show greater neural activation while hearing a new word because they sense their owners want them to understand what they are saying, and they are trying hard to do so. “Dogs ultimately want to please their owners, and perhaps also receive praise or food,” said Emory neuroscientist Gregory Berns, senior author of the study, in a statement.

“Dogs may have varying capacity and motivation for learning and understanding human words,” Berns says, “but they appear to have a neural representation for the meaning of words they have been taught, beyond just a low-level Pavlovian response.”

Editor's note: This file was originally published in August 2016 and has been updated with new information.

Mary Jo DiLonardo writes about everything from health to parenting — and anything that helps explain why her dog does what he does.

Your dog totally gets what you're saying
Dogs understand what we say and how we say it, say researchers in Hungary.