To do this, you have to be able to hear the exact pitch in your head, always. My mother could. Her choir teacher in high school used her voice to "tune" the choir. As in
"Helen, give us an E flat just above middle C". She could do it even years after she stopped singing in public.
(In my very humble opinion people who can do this are disgusting---grin!)