Bill Cosby performed in public for the first time since a sex abuse scandal embroiled him in 2015, joking that he "used to be a comedian" and playing with a jazz band in his hometown as a retrial looms in his criminal sexual assault case.

The 80-year-old entertainer took the stage for about an hour Monday night at a Philadelphia jazz club for his first show since May 2015. Before a friendly crowd, he told stories, honoured old friends and finished by leading the band in a set, first using his mouth to scat in place of a missing horn section and then taking a turn at the drums.

Cosby, handing the drumsticks off to the bass player's 11-year-old son, asked if the boy knew who he was and then told him.

"I used to be a comedian," Cosby deadpanned.

Cosby reminisced about his childhood, telling the crowd about how when he was 4 he grilled a relative about the impending birth of his brother. He mimicked his Uncle William, who took a swig from a cocktail before answering every question — including whether a stork was really delivering the baby to his parents.

Afterward, Cosby nearly dropped a glass jar he was using as a prop, prompting a "Whoa!" from the crowd.

Cosby, who's legally blind, seized on the moment.

"Let me tell you something about people talking to blind people, you sighted people," Cosby said. "If you see a blind person walking into a pole or something, if you speak perfect English, there's a word called 'Stop!' Not 'Whoa, whoa, whoa, whoa!'

"You laugh when blind people walk into things," he continued. "And guess what: Blind people laugh when sighted people fall down!"

'Hello Friend'

Cosby arrived at the jazz club on the arm of his spokesperson, Andrew Wyatt. He wore a grey hoodie bearing the phrase "Hello Friend," something his late son, Ennis Cosby, often would say.

He posed for photos with friends, including a couple he honoured at the start of his set. They all grew up in the same public housing complex.

Comedian Bill Cosby departs after making an appearance in Philadelphia. (Dominick Reuter/AFP/Getty Images)

Cosby said he decided to make his return to the stage because of his friends.

"I came here tonight to enjoy being with my friends and the musicians and the people who came," he said after the show.

He declined to discuss his upcoming retrial in a sexual assault case.

During the show, the receptive crowd applauded and laughed along with Cosby's jokes, a far cry from how his last performances went. His last comedy tour ended amid protests as about 60 women were coming forward to accuse him of drugging and molesting them over five decades, something he has denied.

Cosby is scheduled for an April 2 retrial on charges he drugged and molested a woman at his suburban Philadelphia home in 2004. He has pleaded not guilty and remains free on bail. His first trial ended with a hung jury last year. Jury selection for his retrial will start March 29.

Cosby's spokesperson notified reporters of the comedy performance about two hours before he was to take the stage at the LaRose Jazz Club. The show was part of a program honouring jazz musician Tony Williams.

Outside the jazz club there was one protester, a woman who frequently hounded Cosby at his trial last year. She played Helen Reddy's song I Am Woman on a loop and held up a sign that said, "Perseverance to all survivors."

The jazz club performance is Cosby's latest step back into the spotlight he's mostly shied from since his December 2015 arrest.

Two weeks ago, Cosby invited reporters to tag along as he ate dinner with old friends at a Philadelphia restaurant.

Over the weekend, Cosby's social media accounts featured photos of him visiting a barber and a café in the area and showing support for the Philadelphia Eagles, who won Sunday's NFC Championship game against the Minnesota Vikings and secured a spot in the Super Bowl.