I was only going to be in France for a few weeks, but the last thing I wanted was to sound like a tourist. I didn't have time to learn the whole language, but I obsessed over pronouncing what I did know, even going so far as imitating the pursed lips of the Parisians I saw on the train from the airport. But, from my first "Bonjour" to the final "Au revoir," it was obvious to everyone I was a mush-mouthed American. And anyone who has carried a foreign accent into a conversation can predict what happened next: People spoke slowly, turned up their volume, and did not seem keen to converse once pleasantries were exchanged or directions dispensed.

Overcoming an accent is difficult, even for people who have lived in a foreign country most of their lives, or actors who have spent years training themselves to sound authentic in a second language. And studies have shown that accents can often be a burden. Sure, some accents can be adorable and others can make people sound smarter. But in some places, people with certain accents (mostly foreign, but some regional ones as well) are sometimes seen as unintelligent, uneducated, incompetent, and flat out unpleasant to converse with.

While our brains are pretty good at picking up (and on) even very subtle accents, we struggle to transfer that insight to our own speech. Why is that? Scientists say it may come down to the first few months of our lives, before we've spoken our first word.

For over two decades, researchers at the University of Washington have been figuring out how our brains learn language. Many of their experiments have involved measuring how babies from different parts of the world respond to sounds over time. In one study, they played a reel of sounds common in both Japanese and English to children from each culture. At around 6 months, all of the babies responded equally to sounds from both languages. But by the time they reached 10 months, babies failed to notice sounds that don't exist in their mother's tongue. For instance, at 10 months, the Japanese babies were ignoring the "r" and "l" sounds that are nonexistent in Japanese, but common in English.

Another study from a different group of researchers suggests that this ability to learn languages doesn't end abruptly, but tapers off as we age towards puberty. After surveying a broad sample of studies, the authors found that the strength of a person's accent in their second language directly correlated with the age at which they learned the language.

"You start learning language by picking up sounds, trying to imitate your parents," explained Eric Baković, a linguist who studies sound patterns in language at UC San Diego, but was unaffiliated with either study. "Then, your brain gets busy doing other things and assumes you have learned all the sounds you need to learn to communicate with the people around you." This library of sounds enables us to communicate fluently and stay abreast of the language as it evolves (language sounds are constantly changing, think of the vocal fry that's recently crept into American English), but makes us effectively deaf to sounds that fall outside it, says Baković.

By the time they reach 10 months, babies fail to notice sounds that don’t exist in their mother’s tongue. Kitt Walker / Flickr

"When you hear a totally different accent or language, you start mapping the sounds onto the language you already know," he said. Rather than pronouncing the sounds of a new language, you piece together a rough approximation with the sounds your brain already knows.

But pesky foreign accents, rooted as they are in our brains' incomplete library of sounds, can be trained away. Joel Goldes is an accent coach based in Hollywood. He works with everyone from actors trying to sound right for a part to foreign business people who want to be free of their linguistic liability. He says his experience fits with the scientific research. "Our brains really block us from hearing what we’re hearing. Until someone is taught to form the new sounds, they don’t hear them. That’s why a person can be in a country 30 to 40 years without losing their accent," he said.

For foreign students trying to sound like native Americans, Goldes starts by asking them to read a short story that has all the characteristics of American English. He says there are usually eight to 12 sounds that trip people up. Some of the most notorious are the "th" sounds in "the" and "thanks", and the "uh" sound in the American pronunciation of words like about, pencil, and mountain (read them out loud to hear it for yourself). Once people recognize the previously unheard sounds, they can start training their mouth to make them. Even then, the process can take years, he says.

Of course, foreign accents aren't the only verbal quirks that give people trouble. An accent tied to a particular region or social group can leave somebody stigmatized as rude or uneducated. Like foreign accents, domestic ones are typically picked up at an early age, but they're easier to modify because they share the same general library of sounds, says Baković. This also makes them easier to pick up, as anyone who has reestablished themselves on the far side of the country can attest (I'm still trying to scrub the r-dropping, consonant-clipping East Coast patois from my clean, California lilt).

Chances are, somebody somewhere thinks you talk funny. Maybe you're a foreigner whose second language is speckled with flair from your native tongue or a rural transplant who is drawling along in a sea of big city chatterboxes. Whatever the case, Goldes says his clients take heart knowing that it's not their fault, and that they can wear down their accents' hard edges. "Once they see that it’s systematic and they can learn to do certain things with their mouth, and that will help them learn the new sounds, that’s the most comforting because it gives them something they can do," he said.