With train horns blaring at 2 a.m., families in a second San Jose neighborhood are outraged that the noise is waking them up in the middle of the night.

Mayor Sam Liccardo is considering legal action to get it to stop.

Neighbors living near Oakland and Brokaw roads in San Jose say they've noticed a big increase in the overnight train horns over the past year. Some neighbors wonder if it's because there are many homeless people living near the tracks.

A Union Pacific spokesman said as a safety precaution its operators are required to sound horns if they see anyone near the tracks. Train crews are required to blow horns as they approach several crossings.

Resident Mina Gali said the noise wakes up her 1-year-old daughter Iris.

"Sometimes the horns sound at midnight or two in the morning," Gali said. "It will wake her from her sleep. It's actually really loud."

Neighbors near Japantown have already complained about train horns blaring overnight.

According to Union Pacific, both locations are on the same line, where there are no established quiet zones.

Liccardo said if a quiet zone is established at crossings near residential neighborhoods, the city would end up footing the bill to boost safety to the tune of millions of dollars. He said the city shouldn't have to bear that cost.

"Union Pacific chose to burden our downtown residents with nighttime operations to improve their own profits and now conveniently proposes a quiet zone option that will cost San Jose taxpayers millions of dollars in safety infrastructure and yet may impose intolerable risks to human life," the mayor said in a statement.

The mayor is holding a community meeting next Wednesday at the Northside Community Center. Union Pacific reps will also be there.