A few days ago, Kevin Kline was in a Flatiron District recording studio, between takes of the Fox animated series “Bob’s Burgers.” “You’ve caught him at an awkward moment,” a producer told me when I arrived, because Kline was currently upside down, stretching his legs into a diamond shape over his head, then doing bicycle wheels, as if prepping for a gymnastics meet.

He returned upright and sat at a mike. Since 2011, Kline has supplied the voice of Bob’s landlord, Mr. Fischoeder, an eccentric mogul with puffy white hair, an eye patch, and, like many of Kline’s characters, a touch of vainglory. This was Episode 508, “The Oeder Games,” in which the tenants threaten a rent strike and Fischoeder subjects them to a gladiatorial water-balloon fight. Kline sat beside H. Jon Benjamin, who plays Bob. The other cast members were being piped in from L.A., along with the show’s creator, Loren Bouchard, who directed both coasts. The recording sessions are largely improvised, with the script serving as “just a blueprint,” Kline said later.

They turned to Page forty-four, Scene twenty. Bouchard instructed Kline through the speaker: “Basically, Fischoeder, you’ve pitched your game to the group, your fun-and-games version of this rent strike, so now you’re confidently expecting them to say yes. Bob is confidently expecting them to say no. Let’s read it through, starting on line seventy-eight.”

“Now what do you say?” Kline began.

Bouchard: “Louder.”

“Now what do you say?!”

A few beats later, Benjamin (as Bob) said, “Mr. Fischoeder, we’re not doing your water-balloon fight. We’re standing together, right?”

Kline’s next line was, “And the game begins now!” But it came out more like, “And the bane gigabinth!”

“Took a hit of your nitrous?” Benjamin asked, off-script.

They moved on to scene eleven, page thirty. Kline read the line, “I hear there’s drama in the hedge maze. Which, by the way, is the title of my autobiography. Don’t steal it.”

He looked up and said, “What about ‘hubbub in the hedge maze’?” There was chuckling in L.A. “Got a laugh. Does that mean yes?”

On a break, Kline sat in the control room, where a ham sandwich had materialized. His kids, Greta and Owen, had urged him to join “Bob’s Burgers”—they were fans of Bouchard and Benjamin’s previous series, “Home Movies.” Voice acting, he insisted, isn’t much different than acting acting. “There are ‘voice actors’ on the stage right now. And there’s some mime acting. And nineteenth-century Delsarte acting,” he said, referring to the French teacher who codified theatrical gestures and expressions. He demonstrated some Delsarte-style face acting: “This is good for grief! This is good for surprise!”

Kline has two new movies out, which draw, in different ways, on his Fischoederian sense of grandeur. In Israel Horovitz’s “My Old Lady,” he plays an alcoholic who inherits an apartment in Paris, only to discover that a nonagenarian British woman (Maggie Smith) lives there. In “The Last of Robin Hood,” he’s Errol Flynn, the daredevil actor of Hollywood’s golden age, now past his prime and taking up with an underage starlet (Dakota Fanning).

“David Niven said he was more fun than all of his other Hollywood friends put together,” Kline said of Flynn. “He was a shit-stirrer, always doing pranks, putting dead snakes in Olivia de Havilland’s underpants while she was not in her dressing room. But in the movie there ain’t no swashbuckling. He broke his back on his boat and got addicted to morphine, according to one of his ex-wives. Others said, ‘No, no, no, he never had a problem with drugs.’ He had this insatiable, Rabelaisian appetite for all things sensual.”

Still, Kline could have swashbuckled if necessary. At Juilliard in the seventies, he learned fencing (which came in handy for “The Pirates of Penzance”), along with other specialized skills. “We had a wonderful guy who taught us how to bow—a Restoration bow, an Elizabethan bow,” he said. “How do you walk with a walking stick? How do you take snuff? What is a pavane? We had to do improv in iambic pentameter. That class did not last long.”

Then there was voice, taught by Edith Skinner, the author of “Speak with Distinction.” Skinner helped Kline lose his St. Louis accent, much as Hollywood ironed out Flynn’s Tasmanian drawl. “People came back from the first school break and said, ‘Edith, all my friends say I sound phony and affected,’ ” Kline recalled. “And she’d say, ‘Change your friends.’ ”

Kline studied French in high school, but for “My Old Lady,” which was shot in Paris, he had to disregard what he knew—the character is a hopeless “parlay-voo” type. He had boned up while starring in the 1995 film “French Kiss,” opposite Meg Ryan. “When we were promoting the film, I did some interviews in French,” he said. “By the end of the press junket, I knew how to talk about that film. I knew how to say, ‘It was wonderful working with her.’ It’s always the same questions.” So what was it like working with Maggie Smith? “Un grand plaisir. Une actrice hors catégorie.”

Recording resumed, and the L.A. actors seemed loopy—they had drunk champagne with lunch, to toast their recent Emmy win for Outstanding Animated Program. “They won? Get out!” Kline said. Sifting through his script, he conveniently switched pronouns: “Now that we have an Emmy, can I hire someone to collate all my pages?”