Houston (2011) reports that fetuses offer consistent responses to auditory stimulation between the ages of 25 to 29 weeks gestational age. Therefore, by the time the child is delivered full-term, the newborn often has some two months of listening experience. Houston reports that the fetal hearing experience may influence some areas of speech perception. Previous studies of in-utero acoustics and in-utero filtering suggest frequencies greater than 1000 Hz are likely attenuated some 25 dB, often preventing higher frequency information (which differentiates many phonemes) from reaching the fetus.
However, intonation and rhythm (i.e., suprasegmental information) are likely more available to the fetus and may become encoded as speech information into the child's long-term memory. It has been previously reported newborns can discriminate their native language from other languages and their mother's voice from other voices and familiar nursery rhymes from novel rhymes, all of which supports the supposition that newborns encode suprasegmental parts of speech and they appear to prefer intonation which includes emotional information.
Further, it appears newborns have some "initial auditory sensitivities" to specific acoustic/phonetic cues which are not fixed and can be influenced by linguistic input. In essence, infants have a perceptual system which can discriminate most sounds across all the world's languages. However, as the child gains experience with particular language(s), the infant becomes more sensitive to familiar sounds and contrasts and less sensitive to unfamiliar (linguistically less relevant) sounds.
For More Information, References, and Recommendations
Houston D. (2011) "Infant Speech Perception" in "Comprehensive Handbook of Pediatric Audiology." Editors; Seewald and Tharpe. Plural Publishing, San Diego, CA.