I don't recall a point in the history of the world where living organisms didn't communicate expression even when alone, nor can I remember the concept of talking to oneself as being viewed as anything short of a mental disorder in the last 5 decades.
"Judge a fish by how well it is able to climb a tree, and the fish will go his entire life feeling as if it is stupid." Uncertain
It is weird when you hear someone talking to themselves, but it turns out they are wearing an earbud, and are on the phone. One could use the earbud trick, as cover, when you talk to yourself, since that extra prop makes it acceptable.
Is singing or humming to yourself or air guitar the same thing?
Say two people are arguing, but neither is listening to the other; Trump versus Harris, does that mean each is talking to themself? Again, as long as someone else is present, you can talk to yourself, while pretending to be listening to others.
There are also people who will not stop talking, to where people try to avoid them. Do they talk for themselves, but game the system, by corralling ears to make that fact pass social muster?
When I write I often read what I wrote, out loud, so I can hear the words and not just read them silently. The extra sound adds extra checks and balance, by being an external sound source via my ears. It become more like hearing it, as though someone else said it and how I might react. I do not post everything I write. Some rocks are best not turned over for examination.