The judge set an arraignment for July 20, at which time he could enter a plea. But Cosby waived his right to appear at that proceeding. That sets the case on a trajectory for trial on a date yet to be set.

Andrea Constand, the former Temple University employee who said Cosby violated her at his suburban Philadelphia mansion in 2004, was not in the courtroom and the judge ruled that she would not have to testify.

Instead, prosecutors had portions of her statement to police read into the record.

She told police in 2005 that the comedian penetrated her with his fingers after giving her pills that made her dizzy, blurry-eyed and sick to her stomach, her legs "like jelly".

"I told him, 'I can't even talk, Mr Cosby.' I started to panic," she told police.

In his own statement to police, also read in court, Cosby portrayed it as consensual sexual activity, saying Ms Constand never said "no" as he put his hand down her trousers.

Cosby's lawyers argued unsuccessfully that reading Ms Constand's statement instead of putting her on the stand would be hearsay and would deprive him of his right to confront his accuser.

Such testimony from law enforcement officers is common practice at preliminary hearings in Pennsylvania, which have a far lower burden of proof than trials.

In her statement, she said Cosby told her the pills were herbal medication.

She said he also urged her to sip wine even though she said had not eaten and did not want to drink.

Ms Constand told detectives that Cosby positioned himself behind her after telling her to lie down on the couch. She said she awoke with her bra askew and did not remember undoing it.

In excerpts read in court from his own statement to police in 2005, Cosby said he and Ms Constand had had other "petting" sessions before.

Cosby also told police the pills were over-the-counter Benadryl that he takes to help him sleep. He said he gave Ms Constand one and a half pills and she did not ask what they were.

During Tuesday's hearing, Cosby lawyer Brian McMonagle questioned why Ms Constand continued to see the comedian and even returned to the house to meet with him after the alleged assault.

Detective Katherine Hart testified that Ms Constand told detectives in 2005 she went back to Cosby's home to confront him about what had happened.

Ms Constand also told detectives she contacted Cosby after moving to Canada because she wanted tickets to one of his comedy shows. Mr McMonagle said Ms Constand brought a present for Cosby.

Prosecutors reopened the case last year after dozens of women levelled similar allegations and after Cosby's sealed deposition in Ms Constand's lawsuit was made public.

He settled her lawsuit for an undisclosed sum in 2006 after testifying about his extramarital affairs, his use of quaaludes to seduce women and his efforts to hide payments to former lovers from his wife.

Cosby has not entered a plea since his December 30 arrest. He is free on one million dollars (approx. €897,000) bail.

He is also fighting defamation lawsuits across the country for allegedly branding his accusers liars and is trying to get his homeowner insurance to pay his legal bills.