While outside sources can contribute to the sounds you hear during sleep, they can also be part of your echoic memory (sound memory). According to WebMD, echoic memory is stored in the brain’s long-term memory. Per research published in the journal Sleep, 53% of dreams can be traced to past memories, so talking to your sister while dancing on a train could be a stored memory of her voice.
A small study in PLoS One in 2020 showed that most of the audio impressions in dreams are voices. The study consisted of 13 participants who recorded their dreams after waking. They were to give details about settings, feelings, sounds, and thoughts. Of those sounds, a whopping 83% were of people talking in their dreams. Another 60% were dreamers talking to someone else. The study notes that most speech was clear and easy to remember, but there were also instances of a foreign language, laughing, screaming, and cheering. Researchers state that “the available evidence suggests that normal, healthy people usually experience internally generated auditory sensations an array of times every night” (via the British Psychological Society).