Bill Cosby has lost his first bid for a new trial after his sentencing last month for aggravated indecent assault.

In an order Tuesday, Montgomery County Court of Common Pleas Judge Steven T. O'Neill denied a post-sentence motion, in which Cosby asked for a modified sentence and a new trial. Cosby has been sentenced to three to 10 years in state prison based on Andrea Constand's allegation that he sexually assaulted her in 2004.

In the motion, Cosby had asserted that an audio recording used at trial, which captured a 2005 phone conversation between Cosby and Constand's mother, was not authentic and should not have been admitted at trial. He also argued that O'Neill, who sentenced him and presided over the trial, should have recused from the case because of his past interactions with former Montgomery County District Attorney Bruce Castor, who testified at a key pretrial hearing.

Regarding his sentence, Cosby argued that O'Neill had undervalued the impact of Cosby's age and blindness, therefore “overestimating any present danger to the community.”

“At least, the court erred in enhancing punishment in the present case based on uncharged prior misconduct that could not be prosecuted under any applicable statute of limitations,” Cosby's motion said.

Cosby has 30 days to file an appeal in the Pennsylvania Superior Court, the order said, and he will have the right to petition for bail pending appeal. Cosby asked for bail at his sentencing hearing, but O'Neill denied the request.

In a statement Tuesday, Cosby's spokespeople, Andrew Wyatt and Ebonee Benson, said O'Neill's order “shows the 'bias' that he has towards Mr. Cosby.” They said Cosby had filed a petition for review in the Superior Court, including an affidavit from Castor.

Cosby's lawyer, Brian W. Perry of Perry Shore Weisenberger & Zemlock, did not respond to a call for comment Tuesday.

Cosby is also facing a civil lawsuit for failing to pay legal bills. Local firm Schnader Harrison Segal & Lewis is seeking more than $282,000 in the case, which was removed to federal court this week.

READ MORE: