From the script (which is, I believe, exactly what we got in the episode):
"In it's own way, it's a time machine, although, in actuality, it's much more than that. I came across it upon my future travels, to a time quite unlike anything I'd ever dreamed of. There, I met a fellow inventor who discovered a way to identify the energies emitted by... souls."
That's from when Herb first gets to Clark's apartment and interrupts their wedding night.
Hope that helps!