President John F. Kennedy can finally make the speech he never got to deliver because of his assassination — thanks to voice synthesis technology.

Kennedy was on his way to give the speech in Dallas when he was gunned down in his motorcade by Lee Harvey Oswald on Nov. 22, 1963.

His voice — with its signature Boston accent and distinctive cadence — was forever silenced, but the 2,590 words he had planned to deliver survived.

Sound engineers from Scottish company CereProc spent two months this year synthesizing 116,777 voice samples — each 0.4 seconds long — from 831 of his speeches and radio addresses to bring the speech to life.

The eerie recording was published Friday on the website of the Times, the British newspaper that commissioned the project.

These sound units — which were split in half into units known as phones — were analyzed for pitch and energy and had to be tested next to each other to make sure they did not clash, according to the Times.

The W sound in “weapons,” for instance, is not the same as the sound in “words.”

“There are only 40 to 45 phones in English, so once you’ve got that set, you can generate any word in the English language,” said Chris Pidcock, co-founder at CereProc in Edinburgh.

“The problem is that it would not sound natural because one sound merges into the sound next to it so they’re not really independent,” he said. “You really need the sounds in the context of every other sound, and that makes the database big.”

CereProc, which specializes in text-to-voice technology, is used by companies to bring characters and products to life, and also to allow people who are losing the ability to speak due to ailments to maintain their own voice.

Pidcock recreated Roger Ebert’s voice when the late film critic had lost his speech because of cancer. That project involved scouring hundreds of hours of his commentaries from DVDs.

Recreating Kennedy’s delivery for the “JFK Unsilenced” project proved to be a more difficult challenge.

“Because of the old analogue recording devices used, it appeared as if it was a different person speaking each time. Trying to harmonize the environment and manipulate the audio so that it ran together was quite difficult,” he told the paper.

“One of the things we needed to do is get a very accurate transcription of the audio so that things like ‘umms’ and ‘ehs’ could be labeled and we could make sure the phonetic pieces we got were correct,” he said.

“If you label them incorrectly, you might pick the wrong piece and the whole sentence will sound wrong.”

JFK’s 21-minute speech, which he had planned to deliver at the Dallas Trade Mart, was about the risks of populism and the importance of freedom.

“Ignorance and misinformation can handicap the progress of a city or a company, but they can, if allowed to prevail in foreign policy, handicap this country’s security,” the speech says.

“In a world of complex and continuing problems, in a world full of frustrations and irritations, America’s leadership must be guided by the lights of learning and reason — or else those who confuse rhetoric with reality and the plausible with the possible will gain the popular ascendancy with their seemingly swift and simple solutions to every world problem.”