Chicago has one of the highest murder rates in the US, with 51 homicides in January alone.
And President Donald Trump has threatened to "send in the Feds" if the "totally out of control" city cannot halt the "carnage".
But, now, Chicago has spent $1m (£800,000) on ShotSpotter, installing hundreds of sensors in high-crime areas across two of its districts.
And whenever a gun is fired, police officers are immediately given the exact location via a smartphone app.
How ShotSpotter works
Nearly 100 US cities are now using ShotSpotter - but, despite its success, some remain unconvinced.
Dover, the second largest city in Delaware, for example, has said the $195,000 annual cost could be better spent elsewhere.
Quincy in Washington and Charlotte in North Carolina have also decided the technology is not for them.
But ShotSpotter chief executive Ralph Clark said some of the cities that have signed up have seen a 35% year-on-year drop in gunfire.
"We are seeing thousands of incidents," he told the BBC.
"These are not homicides or woundings, but they are still serious crimes.
"These gunshots are not coming from thousands of people messing about, we are finding that it is from a few serious criminals - the authorised shooters in gangs who are using it to intimidate people, protect their turf."
"The biggest lever in reducing gun violence is to de-normalise it, and people are now seeing the police respond to these incidents, and they can see that the police are serving and protecting their communities."
Three years ago, Chicago made a $2m investment in a predictive policing algorithm, which calculated potential victims of gun crime based on two variables, including how many times they had been arrested with others who later became gun crime victims.
Developed by the Illinois Institute of Technology, the system generates a heat list of people most likely to kill or be killed.
But according to a recent report from non-profit organisation The Rand Corporation, the investment has had little effect and simply means those on the watch list are more likely to be arrested.
The Chicago Police Department countered that the report did not represent the prediction model as it currently worked and denied the system was deficient.
Fresno Police Department, in California, recently tested software known as Beware - which sifts through address-specific public data and individuals' public postings to Facebook, Instagram and Twitter - to alert first responders on the way to a 911 emergency call.
The platform, built by security company Intrado, colour codes people's threat level as green, yellow or red.
But one member of the city council told the Washington Post that his threat level was yellow, due to a previous occupant of his address.
"Even though it's not me that's the yellow guy, your officers are going to treat whoever comes out of that house in his boxer shorts as the yellow guy," he said.
The software proved too controversial, and in April the council decided not to renew its contract.
Rob Kitchin, an expert on smart cities from Maynooth University, Ireland, said: "There is this idea that technology can solve the problems of a city.
"People are treating cities as if there are technical systems, and you can pull a data lever and it will steer a city.
"But cities are much more complex - full of politics, culture, community, and wicked problems.
"Cities have to look at the problem and decide what solution is best.
"If it is technology, then great, but it could be economic investment or a change in social policy."