I wrote about this phenomenon a couple of weeks ago. I believe this is an aspect of psychic ability. Many psychics have explained to me how they hear voices and obtain information. They know they are hearing from a source outside of their self.
https://amp.theguardian.com/books/2020/apr/27/majority-of-authors-hear-their-characters-speak-finds-study?fbclid=IwAR0DJ3TvG84YfDq4TzyZcBQSIdBG5tpDGl-RSn7UNlqysyaC0QtD4YXvtak