1.1098161-4158508925
Sarah Silverman Image Credit: AP

Comedian Sarah Silverman has built her career largely on raunchy jokes and other decidedly adult topics.

So it may come as a surprise that a woman famous for an R-rated song about sleeping with actor Matt Damon and for pro-Obama viral videos is now voicing the role of an adorable nine-year-old girl in a Walt Disney family film.

The animated film, “Wreck-It Ralph,” comes out in movie theatres on Thursday. It is about a video game character named Wreck-It Ralph (John C. Reilly) who is tired of always being the bad guy. He goes on a game-hopping journey to prove he can be a hero.

Silverman plays the precocious Vanellope von Schweetz who lives in the candy-themed racing game Sugar Rush. Considered a “glitch” by the other kids because she flickers, Vanellope is an outcast who just wants a chance to race with the other girls.

At first glance, the casting of a stand-up comic like Silverman might seem an odd choice. But Silverman said she knows all about the tough-on-the-outside/sensitive-on-the-inside Vanellope.

“I relate to everything about her,” the 41-year-old said about her character. “I know this girl. The scrappiness and the feeling of being on the outside, looking in and wanting to play. And that what we are most ashamed of — the ‘glitch’ in each of us — can be our super power, our greatest asset, if we let it.”

In Silverman’s case, she cites her bed-wetting as her own “glitch,” which she chronicled in her 2010 comic memoir, “The Bedwetter: Stories of Courage, Redemption, and Pee.”

“I was a bedwetter until I was in my teens,” she said. “[I took something] from my childhood that I thought would be my greatest shame and let it inform the greatest part of my life. I went in to comedy and was not scared because I had suffered great humiliations growing up. Bombing in front of strangers on stage? Who cares! The stakes got lower for me because I had nothing to lose.”

Silverman said she was excited to potentially become a role model to kids, “especially girls,” via Vanellope. The cartoonish perkiness that’s part of her persona has already landed Silverman guest spots on kids’ shows like “Yo Gabba Gabba.”

In fact, Silverman says she has plenty of comedic material for kids and is pushing further into the youth market with a soon-to-be released app.

“I have an app coming out called ‘Uncle Sarah’ and it’s for toddlers and babies — I can babysit your kids on your iPad!” she joked. “There’s all this interactive stuff. There’s a song I wrote. I’m excited about it because it’s so weird.”

She’d also like her own kids — someday. “I’m baby crazy but I think I’m going to adopt when I’m at a young grandma age,” she said. “I love kids so much but I love my life and I love taking off at a moment’s notice. I want to have kids when it’s all I want and I can give them the undivided attention they deserve.”

Next up, Silverman plans on filming a cable TV special — her first in seven years — for HBO that will involve both stand-up and film pieces.

Although Silverman points out that she’ll never feel “total job security” in her profession — her NBC pilot “Susan 313” was not picked up for the fall 2012 TV season, for example — she calls her ability to work in comedy, make videos and perform stand-up as “the gift that keeps on giving.”

“As long as I always work on it, change it, be willing to bomb, recalibrate who I am and reflect that on stage, it can last.”