When can the baby hear?

At what week does the baby acquire it's ability to actually hear? My SO keeps telling me "we can't teach the baby that language" because I swear like a sailor. So does anyone know the time frame? I'm 12 weeks 4 days have I already taught the little one bad words?