WORCESTER — A June 4 trial has been scheduled for a woman charged with murdering two of her babies, whose remains were found in 2014 in a squalid Blackstone home that came to be called the "house of horrors."

Judge Janet Kenton-Walker set the trial date for Erika L. Murray Wednesday in Worcester Superior Court at the request of Ms. Murray's lawyer, Keith S. Halpern, and Assistant District Attorney Christopher P. Hodgens. The lawyers said they expected the trial to be jury-waived.

Although Ms. Murray is charged with two counts of first-degree murder, Mr. Halpern said after the court hearing that state law prohibits a jury-waived trial on a charge of first-degree murder and that a bench trial in Ms. Murray's case could only be held if the prosecution agreed that the most serious charge for which she could be found guilty would be second-degree murder.

In addition to the murder charges, Ms. Murray, 35, is charged with two counts each of assault and battery on a child with substantial injury, reckless endangerment of a child and animal cruelty. Mr. Halpern is raising an insanity defense on her behalf, contending that she had a diminished mental capacity that rendered her incapable of premeditating or of forming the intent required for a murder conviction.

Ms. Murray's former boyfriend, Ramon Rivera, 42, is under indictment on two counts each of assault and battery on a child with substantial injury, reckless endangerment of a child and animal cruelty and a single count of possessing marijuana with intent to distribute. He is to be tried separately.

On Aug. 28, 2014, a neighbor called police after entering the couple's home at 23 St. Paul St. in Blackstone at the request of Ms. Murray's 10-year-old son to try to get a baby to stop crying.

Prosecutors said the neighbor was "horrified" by what she saw in the residence. "The upstairs was filthy beyond belief. There was an overwhelming stench of feces," former Assistant District Attorney John Bradley said during an earlier court hearing in the case.

While neighbors knew that the couple had two children, the 10-year-old boy and a 13-year-old girl, the woman discovered a 3-year-old girl and a 6-month-old girl upon entering the house, according to prosecutors.

Mr. Bradley said the neighbor testified before the grand jury that the 3-year-old appeared "dipped in feces" and that feces also covered the walls and soiled diapers were stacked over a foot high.

The neighbor called 911 and police found garbage piled throughout the house upon their arrival, according to prosecutors. Mr. Bradley described the 10-year-old's bedroom as "having conditions similar to a landfill with trash and bottles piled as high as two feet."

On Sept. 10, 2014, as investigators continued to search the home for birth records or documents to identify the youngest two children, they discovered a dead baby with the placenta and umbilical cord still attached, stuffed inside a backpack in a bedroom closet, according to Mr. Bradley. A dead dog and the skeletal remains of another baby were found in the same closet, he said.

The skeletal remains of a third child were found in another closet. The murder charges against Ms. Murray relate to the two dead babies found diapered and dressed in onesies.

While Ms. Murray initially told police that the 3-year-old and 6-month-old had been born at Milford Regional Medical Center, that was not true, according to Mr. Bradley, who said Ms. Murray gave birth to the two girls in the only bathroom in the house and that the children had "never been taken outside the home." He said DNA testing showed that Mr. Rivera was the father of all seven children.

According to Mr. Bradley, the two youngest children were examined by a pediatrician at UMass Memorial Medical Center, who told investigators she had never seen such a case of neglect. He said the 3-year-old had no muscle tone and was unable to walk, talk or hold utensils and that the 6-month-old appeared to have been on her back for most of her life.

All four children were initially taken into custody by the state Department of Children and Families.

In 2016, Judge Shannon Frison denied a motion filed by Mr. Halpern seeking the dismissal of the murder charges against Ms. Murray. Citing a lack of evidence and what he termed speculation on the part of the prosecution, Mr. Halpern contended the autopsies did not conclude that the two babies allegedly killed by his client were born alive. He said there was no evidence that they died of neglect.

"Though there is little or no eyewitness or other evidence of neglect, abandonment or other maltreatment of the dead infants, the Commonwealth did present to the Grand Jury enough facts and circumstances to support a finding of probable cause that the children were born alive and that the defendant's lack of care for them and the inhumane conditions she created and maintained for them to live in in that house caused their deaths," Judge Frison wrote in her ruling.

Factors leading her to her conclusion, the judge said, included the clothing on the infants, the medical examiner's testimony that the babies were full-term, Ms. Murray's alleged admission that at least one of the infants was born alive and her 13-year-old daughter's testimony that she had seen infant boys in the house several years before.

"The Commonwealth is correct that the facts of this case are bizarre and do not lend themselves to the typical murder precedent in Massachusetts," Judge Frison said in her ruling, citing case law. "Here too, the grand jury could have inferred that the nature and circumstances of the defendant's concealment of the babies and their decomposed condition were indicative of her intent or apathy towards the two infants," the judge wrote.

District Attorney Joseph D. Early Jr. said previously that the assault and battery charges both Ms. Murray and Mr. Rivera face are for the two youngest children, the reckless endangerment charges were for the two oldest children and the animal cruelty charges related to a cat and dog that were removed from the Blackstone home

In addition to setting Ms. Murray's trial date Wednesday, Judge Kenton-Walker scheduled a final pretrial conference for May 6, at which time Ms. Murray is expected to be asked to formally waive her right to a jury trial. Mr. Rivera's case was also continued to that date.