Those of us who have dogs as pets/family members have known this for a long time. Some dogs/breeds are smarter than others but most dogs can differentiate tone as well as what words are being spoken. My last dog didn't care what I called her if I said it in an upbeat tone, I tested this all of the time by calling her a shithead and more and she would thunk the floor with her tail.
Studies are always great but I feel like this is s something that is fairly well settled by now.
It was actually hilarious and interesting one time. I called her jackass or shithead or something and she looked up at me and you could see her thinking and then her tail started putting a hole in the floor. It's like she needed a moment to decide how she felt about it.
If she heard it used negatively in the past, then she was probably thinking about it being similar to how you say her name nicely or angrily depending on what she is up to.
They definitely take longer to process more complex speech (compared to 1-2 syllable commands or gestures)than humans do but they understand more than we give them credit for
Same as cat, they do know that you called them, just that a lot of time they prefer to not answer. They also know what you're talking about, and know the tone. That's why dog and cat are domesticated, they can communicate with us, unlike for example, a baboon or gorilla.
I have 3 cats, and sometime i came home one of them wouldn't wait for me at the door, only when i say "where's Tina?" she will come running down from upstair to greet me.
We have an auto feeder for our cats and I thought it would be funny to have the echo announce "kitties, time to eat" before it goes off. They now both line up at the feeder when their specific announcement happens. Their ears will perk up when it starts making any announcement, but they only run once it starts saying kitties