The inaudible geometry of nilmanifolds