The method, described in the US journal the Proceedings of the National Academy of Sciences, measured the distance between echoes to create maps of both a university lecture room and a cathedral alcove.
With more refinement, the technique could someday lead to better ways of designing concert halls for specific acoustics, aid investigations and even help with crime scene reconstruction, researchers said.
"Our software can build a 3D map of a simple, convex room with a precision of a few millimeters," said lead author Ivan Dokmanic, a PhD student at Switzerland's Ecole Polytechnique Fédérale de Lausanne (EPFL).
The microphones did not need to be placed in precise locations in order to pick up the original sound and its echoes.
The lags between the sounds and the echoes were used by the algorithm to calculate the distance from the microphones, walls and sound source, and recreate the digital 3D shape of the room.
"Architects could use this to design rooms — for example concert halls or auditoriums — based upon the specific acoustics they would like to create," said Dokmanic.
Forensic science could use the approach to recreate details about a room that cannot be seen, or to identify the whereabouts of a person calling from inside a room.
Some people, including the blind, can naturally detect the general shape of a room by hearing sounds within it.
The same process, known as echolocation, is used by bats and dolphins to navigate in the environment.
Co-authors of the study came from Harvard University's school of engineering.