Formal:
* Animism: This is a belief system where inanimate objects are believed to have spirits or souls. Talking to them would be a way of communicating with those spirits.
* Personification: This is a literary device where human qualities are given to inanimate objects. While it doesn't mean literally talking, it's a way of engaging with objects in a more personal way.
Informal:
* Talking to oneself: This is a common idiom used when someone is talking out loud to themselves, which can sometimes involve talking to objects as if they were people.
* Talking to things: This is a more casual way of describing the act of speaking to inanimate objects.
* Having a conversation with (an object): This emphasizes the act of speaking back and forth, implying a more interactive experience.
Ultimately, the best word will depend on the specific situation and the intended meaning.