Did you hear the one about the guy who learned how to make friends and influence people with the help of Howard Stern and David Letterman?

David Finch, a former marketing exec who has been dealing with the socially crippling aspects of Asperger’s syndrome, says he overcame his awkwardness by studying the top talk-show hosts.

Each star did one thing exceptionally well, Finch discovered. And by copying what they did, he began — for the first time in his life — to piece together a public personality for himself.

He’s just written a book — “The Journal of Best Practices: A Memoir of Marriage, Asperger Syndrome, and One Man’s Quest to Be a Better Husband” — about his experience.

Finch was married for five years before he was diagnosed with Asperger’s syndrome, an autistic disorder characterized by obsessiveness, egocentricity and difficulty communicating and reading social cues.

His marriage to wife Kristen was unraveling — and the diagnosis alone had not solved their problems.

To save his marriage, Finch — who obsessed over routine, itchy clothes, his favorite seat, fantasies about setting traps and so on — turned his obsession on himself and began studying how other people act.

“I spent a lot of time in my car, and I listened to Howard Stern constantly,” he says.

“He would tell a story about his wife going out of town. He would talk about what he did in the apartment, and he would keep it going for 30, 40 minutes. And I would circle the block to hear the ending.”

Finch said he listened to “how he modulated his voice, he would slow his speech down or speed it up. And he was very deliberate at crafting his point and then expressing it. It always sounds like he’s about to make a point.”

“Fred [a sidekick] would interrupt the conversation three times. Howard used each interruption to his advantage to keep telling the story, which was something I couldn’t do.

“I would get so annoyed when we got off track. I would just stop.

“Howard would find a humorous way to disarm an interruption,” Finch noted.

“I watched a lot of David Letterman for the same reason I [listened to] Stern,” David said. “I don’t care who he’s interviewing. What I cared about was his banter.

“He adjusts his body language, he looks straight into the camera when he tries to land a joke and changes his facial expression.”

Finch, who had been a drama geek in high school, never had a problem playing a part. So, he began mimicking the hosts.

“I knew that if I was talking exactly like them I would get some funny looks,” he said. “I knew this because I tried it.

“I asked colleagues some mortifying questions. I would say things like: ‘When was the first time you noticed you were having sexual feelings for your wife?’ ”

Eventually, he discovered a more nuanced approach.

“As I started doing it more, I found that if . . . I did it in an exploratory way — try to get to know them better — after a while I was having really nice conversations with people.

“I always thought conversations were overrated. But now that I could actually do it, I thought it was really cool.”

After finding success by paying attention to the people he talked to, Finch branched out.

“I never thought I’d find Regis Philbin funny,” he says, but “Regis talks to people like he is just star-struck in admiration of this person — his enthusiasm really got me.”

David no longer has problems making small talk at parties, though he prefers more intimate conversations.

He left his job as a marketing engineer, and now speaks professionally to groups.

“Yes, I was playing a character, but, after a while, it became a learned behavior. “