In April 2010, Adriano Lameira set up his video camera in front of an enclosure at Cologne Zoo in Germany. Inside was an orangutan called Tilda.

There was a rumour that Tilda could whistle like a human, and Lameira, of Amsterdam University in the Netherlands, was keen to capture it on camera. But as the camera kept rolling, Tilda did much more than just whistle. She clapped her hands, smacked her lips, and let out a series of deep-throated human-like garbled sounds: almost like someone who had inhaled sulphur hexafluoride, a gas that makes your voice deeper.

Lameira was baffled. "These were not only very different from whatever we have heard from wild orangutans so far, but we could also see some similarities with human speech," he says.

Tilda wasn't the first animal that seemed to be able to mimic human speech. A handful of other species also make noises that sound like talking, including elephants and beluga whales – to say nothing of parrots.

These animals seem capable of bridging the language barrier that separates us. And their attempts at speaking like us make them quite irresistible. But can they really "talk" as we do? It's not just a matter of being able to make the sounds. To really count as talking, the animals would have to understand what they mean.     

Tilda was born around 1965, captured from the island of Borneo and raised in captivity. She is among the first of our closest cousins known to have successfully imitated human-like sounds.

Lameira's team found that her calls were strikingly similar to human speech. Their rapid rhythm precisely matched that of humans speaking. Moreover, she seemed to be stringing together vowel and consonant-like sounds. That is a precursor to how we build syllables, words and sentences, Lameira says.

Nevertheless, her calls are far from being a perfect imitation of our speech. But she is not the only mimic out there. Famously, parrots are good at, well, parroting.

The undisputed champion of speech mimicry was an African grey parrot called Alex. He was trained by cognitive scientist Irene Pepperberg of Harvard University in Cambridge, Massachusetts. Alex could quickly learn and imitate new English words. He could even say "I love you", and wished Pepperberg good night after a hard day's training. When Alex passed away in 2007 at the age of 31, fans from all over the world mourned.

Other mimics use completely different mechanisms

So what makes parrots like Alex such proficient impressionists?

Part of the answer lies in their vocal tract, says Pepperberg. "Their vocal tract's complex musculature, and their thick, yet flexible, tongue may help them produce human speech sounds more easily," she says.

However, other mimics use completely different mechanisms to make the sounds. Take Noc, a beluga whale at Vancouver Aquarium in Canada, whose speaking abilities were described in 2012. Captured young by Inuit hunters and raised in captivity till his death in 1999, Noc would over-inflate his nasal cavities to produce human-like sounds.

One elephant can also mimic human speech, using yet another method. Described in 2012, Koshik produces several words of Korean by placing the tip of his trunk into his mouth to modulate his vocal tract.

By doing so, he accurately matches both the pitch and timbre patterns of his trainers' voices, says Angela Stöger-Horwath of the University of Vienna in Austria. This is remarkable, she says, considering that elephants' vocal tracts are anatomically different from ours: they are longer, and they have a trunk instead of lips.

Despite their different styles of imitations, these animals do have something in common. They are all "vocal learners". That is, they hear sounds, learn to imitate them, and then produce them.

Many animals only produce the calls that they are born with

Humans, the best vocal learners, can learn and produce countless different sounds. Beluga whales and dolphins also naturally learn hundreds of new vocalizations throughout their lives. Some parrots and songbirds are prolific learners as well, sometimes even picking up sounds from other species and objects around them. Famously, lyrebirds have learned to mimic the sounds of human machines like camera shutters and chainsaws.

Other vocal learners are much less skilled. While Grey parrots can learn and produce thousands of calls, zebra finches learn only a few songs as fledglings, which they stick to during their entire lifetime. What's more, many vocal learners can only imitate sounds from their own species.

Most animals are not vocal learners. They only produce the calls that they are born with: for example, cows moo, dogs bark, and pigeons coo. These animals are unable to imitate new sounds.

So what is it about some animals' brains that allows them to imitate speech?

The key region is in the forebrain, says Erich Jarvis of Duke University in Durham, North Carolina. There are particular brain circuits that control the muscles for vocalizations, and only some animals have them.

In a 2004 paper, Jarvis described a region of the forebrain that makes direct connections with the voice muscles in both humans and parrots. These brain circuits help them learn new sounds, and then control their vocal tract muscles to produce the learned sounds. Animals that are not vocal learners lack these forebrain pathways. They only have circuits in the brainstem, the most primitive part of the brain, that may control their innate calls.

This is reflected in the animals' genes. In 2014, Jarvis and his colleagues studied how genes are turned on and off in the brains of different animals. A set of over 50 genes showed a similar pattern of activity in the speech-control centres of several vocal learners, including humans, parrots, songbirds and hummingbirds. This means humans use the same genes to speak as songbirds use to sing. Animals that can't learn new sounds, like chickens and macaques, don't activate these genes in the same way, Jarvis says.

Strangely, great apes are not great mimics, even though they are our closest relatives and their brains are similar to ours. Apart from Tilda, most non-human primates show no sign of the advanced mimicry that humans and parrots can do.

Their voice box can produce many of the different sounds that we can

For a long time, researchers believed that their vocal organs were the issue. Their vocal tract is similar to ours, but studies in the 20th century had suggested that their voice boxes do not descend as far as ours do.

But that's not true, says Jarvis. In 2003, researchers found that the voice boxes of baby chimpanzees descend soon after birth, just like those of humans.

"Theoretically their voice box can produce many of the different sounds that we can," says Jarvis. "But they just don't." Either apes don't have the forebrain pathways involved in vocal learning, he says, or the pathways are non-functional for some reason.

In fact, when we list the species that can learn to produce new sounds, they are quite far apart on the evolutionary tree. Five groups of mammals can do it: humans, bats, elephants and seals, plus cetaceans like dolphins and whales. There are also three groups of birds that can do vocal learning: parrots, songbirds, and hummingbirds.

So vocal learning looks like a case of convergent evolution: it probably evolved independently in the different groups of animals, rather than just once in their common ancestor. So why did they bother?

Most "talking" animals belong to highly social species, says Diana Reiss of Hunter College in New York. But in captivity, they are separated from their own kind with only humans to interact with.

So humans become their models for imitation, says Lameira. "Copying human sounds is like doing what your peers are doing."

Imitating human sounds may also be a way to bond with people, says Stöger-Horwath. She thinks that is why Koshik the elephant does it.

The same may be true of a beluga whale called Nack, according to his trainer Tsukasa Murayama of Tokai University in Kanagawa, Japan. Nack can imitate rudimentary Japanese words and sounds, including a weak rendition of "Tsukasa". Murayama thinks this is a way of playing with us, as Nack does not get any explicit rewards for doing it.

In the wild, too, vocal learners use their many calls to bond with other members of their species. The ability to learn new sounds also allows them to change their vocalizations, for instance if they need to join new flocks, says Pepperberg.

Their vocal skills could make them more attractive to the opposite sex, by demonstrating their intelligence, says Jarvis. "I think something like that exists in humans, where you have guys or girls who are trying to show off how smart and how intelligent they are with all the information they have. I think that's what mimicry is about."

Where all these animals fall down, it seems, is the way they use the words they have learned. They don't know what they mean, and are simply parroting them without understanding.

You can teach your dog to understand the words "sit" or "fetch the newspaper"

Koshik's behaviour illustrates this clearly. He has been trained by his carers to obey commands, so he has learned that when a carer says "nuo", the Korean word for "lie down", he should lie down. Koshik can also say the word "nuo", having learned to imitate it. But he cannot use the word meaningfully. "He does not expect the keepers to lie down when he produces the imitation 'nuo'," Stöger-Horwath says.

In this respect, Koshik is quite a normal animal. You can teach your dog to understand the words "sit" or "fetch the newspaper", says Jarvis. But the dog cannot imitate these words, let alone use them to tell you what to do.

There is one glaring exception to this rule: Alex the parrot. Not only could he say dozens of English words clearly, he used them to identify objects, colours, shapes, and numbers.

They learn words and then use them to ask for toys or treats they want

Following Alex's death, his trainer Pepperberg has begun working with two new African grey parrots: 20-year-old Griffin and 2-year-old Athena. The idea, Pepperberg says, is to ask questions of the birds, just as we can ask questions of small children. She hopes to find out "the extent to which they understand concepts such as 'bigger or smaller', and 'same or different', how much they understand about numbers, optical illusions, probability."

Mimicking human sounds may have an extra benefit for these parrots, above and beyond simple bonding, says Pepperberg. It gives them control over their lives. They learn words and then use them to ask for toys or treats they want, or to go to specific places.

Clearly, African grey parrots operate on a far high level than any other animal mimic. Nobody yet knows how or why this one species of parrot can do what other animals cannot.

What is clear, however, is that vocal mimicry is the basis of human language.  Our imitative skills allow us to learn and reproduce a huge range of sounds. It is this vast repertoire that allows human languages to have such immense vocabularies, all the way from "at" to "pneumonoultramicroscopicsilicovolcanoconiosis".

We don't yet know when our speech and language evolved. Could our ape-like ancestors, such as Australopithecus, talk? What about more recent species like the Neanderthals?

Some animals can mimic the sounds of human speech

Tilda could help resolve this question. Clearly, the sounds she imitated are not massively difficult for orangutans, says Lameira. That suggests that the ability to produce them evolved before the orangutan lineage split from the lineage that gave rise to humans. "This can give us a sort of timeline of speech evolution," says Lameira.

Perhaps we shouldn't be too surprised that the ability to mimic sounds is ancient. Many of the mechanisms involved, such as the ability to control the noises you make, are basic and many animals have them.

The truth seems to be that some animals can mimic the sounds of human speech, but only a tiny minority can talk meaningfully as humans do. These less capable animals are just as fascinating as the truly skilled, because they could reveal how our own language skills evolved.