Man's best friend may understand you as well as your actual best friend might.

Research comparing the brain function of dogs and humans found that dogs have "voice areas" in their brains located in the same region as humans. And in both species, this part of the brain is adept at understanding the subtleties between our voice tones that express our different emotions.

"Dogs and humans share a similar social environment," Attila Andics of MTA-ELTE Comparative Ethology Research Group in Hungary said in a press release. "Our findings suggest that they also use similar brain mechanisms to process social information. This may support the successfulness of vocal communication between the two species."

Get Breaking News Delivered to Your Inbox

Researchers scanned the brains of 11 dogs with an fMRI scanner -- a device that measures brain activity -- while they listened to almost 200 dog and human sounds. The samples included whining, crying, happy barks and laughing.

Both dog and human brains lit up in the voice area -- which was located in similar, corresponding locations -- when they heard the sounds.