I am the same way. If you're crazy, that means I am crazy. And that is simply not true. I have conversations with myself ALL THE TIME! And yes, I talk like I am talking to another person, but I hate being in social situations. But then after i am done talking to myself, i feel incredibly stupid. I hate that feeling. But talking to myself is a kind of therapy for me. Especially taking to my pets. I will hold entire conversations while I am walking the dogs. I'm sure people see me, and sometimes I get embarrassed. Don't be too hard on yourself.
I am not judging you so I want you to feel comfortable here. Your situation is not uncommon so I don't want you to feel like you are crazy.
What is likely going on is that you are not engaged in the conversations.
It seems to me like you want to talk about something that no one is interested in so you talk to yourself. We all actually do it but not many times is it a verbal conversation.
You may want to talk about dragons and wizards but others want to talk about politics. You may want to talk about the cycles of the moon but others want to talk about which movie star has the best hair.
What I would recommend is when you are alone enjoy that time. If you want to have and keep friends, learn how to shut that mind down for a little bit and be actively listening when they talk. If an intense thought pops into your head that you can't shake start carrying around a small notebook and write it down in there. That way when you are alone again you may think about it then.
Ok I think it might be anxiety because right now I'm freaking out about what people are goi g to think of this even though I'm fairly sure no one will even read it because no one ever really takes notice of me it's like I'm invisible some times