Are we moving a bit closer to the day when machines can read our minds?

Scientists have developed a system using artificial intelligence that can turn brain activity into text. At the moment, it works on neural patterns interpreted when someone speaks aloud, but there is hope among researchers that it could eventually be used for patients who are unable to speak or type.

“We are not there yet but we think this could be the basis of a speech prosthesis,” Joseph Makin, co-author of the research from the University of California, San Francisco, told The Guardian.

Makin and his colleagues recruited four participants who had electrode arrays implanted in their brains to monitor epileptic seizures.

Participants were asked to read aloud from 50 set sentences multiple times, including “Tina Turner is a pop singer,” and “Those thieves stole 30 jewels.” Scientists tracked their neural activity while they were speaking.

All of this data was then fed into a machine-learning algorithm, according to the researchers’ work published in the journal Nature Neuroscience, a type of artificial intelligence program that turned the brain activity data for each spoken sentence into a string of numbers.

The algorithm first generated nonsense sentences. However, as it compared each sequence of words with the sentences that were actually read aloud the results gradually improved. Next, researchers tested the system, generating written text just from brain activity during speech.

That produced varying accuracy rates, but for one participant only 3 percent of each sentence on average needed to be corrected.

Christian Herff, an expert in the field from Maastricht University who was not involved in the study, told The Guardian the research was exciting because the system used less than 40 minutes of training data for each participant and a small collection of sentences, rather than the millions of hours typically needed.

“By doing so they achieve levels of accuracy that haven’t been achieved so far,” he said.