Keira Knightley says she feels like “a charlatan.” The 29-year-old British actress is starring in “Begin Again,” a breezy summer movie filled with music.

The film is from John Carney, the director of the much cherished “Once” about two Dublin singer-songwriters whose lives are enhanced by collaborating.

“Begin Again” involves another musical couple. Early on, viewers find out that Knightley’s Greta, a songwriter, has been dumped by her self-involved American rock star boyfriend Dave (Adam Levine of Maroon 5 and TV’s “The Voice”). About to head back home to England, Greta is forced by a friend to perform at an open-mic night at an East Village nightspot.

 

As most in the crowd talk quietly through her timid performance, Greta’s song captivates Dan (Mark Ruffalo), a scruffy record-label exec on a downward spin.

He sees the commercial potential and approaches her afterward. Though Greta is wary and not interested in selling out, the two hit it off, sharing their strong opinions and enthusiasm for music, dropping names like Bob Dylan and Randy Newman.

While convincing in the film — both as a performer and a music enthusiast — Knightley admits, “I barely listen to music. I know absolutely nothing about it.” This is somewhat surprising, as Knightley recently celebrated her first wedding anniversary with James Righton, keyboardist and co-vocalist for indie rockers Klaxons.

 

“I think that’s one of the reasons I wanted to be in the film — because I’m married to a musician,” she says. “And all my friends and family are completely obsessed with music.”

“Begin Again” is currently in limited release and will open areawide July 11. Produced by Judd Apatow, the film premiered at last year’s Toronto International Film Festival, where the Weinstein Co. bought the U.S. rights for $7 million — and asked for a different title.

Originally, the movie was called “Can a Song Save Your Life?”

 

“The title seemed to be dividing people,” Carney says. “It was like it was going to answer this big question.

“I didn’t want the film coming off like that. I think that films tend to raise questions rather than answer them.”

Carney, the former bassist for Irish rock band the Frames, is about to begin a new film, “Sing Street,” about a high school band in Dublin during the 1980s. U2’s Bono and The Edge are musical advisers.

Carney’s bandmate Glen Hansard starred in “Once.” The $120,000 production grossed $20.7 million worldwide, and Hansard — along with co-star Marketa Irglova — won an Oscar for best song. The 2006 film was adapted for the stage in 2012 and won eight Tony Awards.

 

“It was such a personal story,” Carney says. “The idea of it reaching such large audiences and going to Broadway was really surprising.”

For “Begin Again,” which cost around $9 million to produce, the writer-director contributed two songs to the film, while Hansard co-wrote one. The rest of the songwriting was led by New Radicals frontman Gregg Alexander.

Carney has said he briefly thought about casting Adele in the role of Greta. In “Once,” he used real musicians who had never acted before, but neither Hansard nor Irglova were huge pop stars. Casting Adele would have changed the feeling of the story.

 

Instead, in Knightley, Carney got an actress who didn’t sing. In the 2008 film “The Edge of Love,” she credibly crooned “Blue Tahitian Moon” as an actress turned singer during World War II, but there was a band. As Greta, she is a songwriter performing her own songs with minimal backup. “Keira was immediately out of her comfort zone,” says Carney. “The question was how much she would enjoy it.”

As it turned out, Knightley very much enjoyed making “Begin Again.” The actress had just come off making “Anna Karenina” for director Joe Wright. The adaptation of the Tolstoy novel was her third film for him, along with “Pride and Prejudice” and “Atonement.”

 

Knightley looked at the previous five years of her work and realized that it had all been very dark.

“I wanted to be part of something much lighter,” says the actress. “So I was thinking maybe putting something out in the world with a little bit of hope wouldn’t be a bad thing.”

She also didn’t mind shooting in New York City, which she thought of as a holiday.

“It’s such an amazing city, and the movie is very much a love song to New York.”

Key scenes in the film involve characters running around on the streets, sharing earphones and creating a soundtrack for the Big Apple.

 

“There is so much energy there,” Knightley says. “It was very important to capture that.”

Many of the street scenes were impromptu; it was the same for the singing. “They were still putting lyrics to some of the songs just before we went into the studio,” she says. “So I really didn’t know how to do research because I didn’t know what I was supposed to sound like and had no idea what they wanted.

“So what we did really wasn’t based on anybody. We went in the studio and tried to figure it out.”

Knightley’s vocals have a sweet sincerity. Carney likes that there is a degree of uncertainty in her voice.

 

“It works,” he says. “She’s got a star quality to her. She is very watchable.”

Next up for the actress is “Laggies” in September. Knightley gets to show her comedic chops in this film by Lynn Shelton. It will be followed by “The Imitation Game,” a drama about famed British World War II cryptographer and computer pioneer Alan Turing with Benedict Cumberbatch. It is set for a November release.

Knightley says she based Greta on some creative types she knows, but acknowledges her musical knowledge remains limited. She says her friends have tried to turn her on to different songwriters and albums for years, but it hasn’t taken. For example, she likes to read with the music off.

 

For “Begin Again,” she did do her homework, though, listening to iconoclastic singer-songwriter Newman (“I Love L.A.”) before talking about him in a scene.

On the set she was surrounded by musicians. Beside Levine, there was CeeLo Green and Yasiin Bey (musically known as Mos Def). Did they or her husband offer her any advice about performing in the movie?

“No, he sort of said, ‘You’ll be fine,’ ” says Knightley. “I think the thing with them is because they don’t understand that you’re really not a singer. They think it’s easy.”