I'm jumping right into products, sorry in advance. These are some of the best around, but there are others in each product category that would do the same thing.
There are in fact programs that will do exactly what you're asking, but they aren't inexpensive. Steinberg's Cubase, a digital audio workstation, will record a mono track of your voice through a microphone, and then with the sample editor you can use a feature called "VariAudio" which plots your voice, note by note, on a vertical "keyboard" that extends the black and white "keys" across the page so that you can see where you're singing. You can also edit the pitch and timing, making notes longer or shorter, and with other edits you can change the amplitude of the note as well.
Cubase is a program in and of itself, but it and other digital audio workstations host third-party "plugins" and those can be even more powerful. Celemony's Melodyne will not only graph your voice according to pitch but will pop out the musical notation right above it given the time signature and key of the song. It works pretty well. Also, with Melodyne, you can strum chords on a guitar or play them on a piano and it will recognize the chord and display the notes on a staff in the very voicing you used, allowing you to then change, say, the root of the chord to the third or the fifth, what have you.
These are some of the tools that industry professionals use to record and to transpose. I have heard of many more but I wouldn't personally recommend something I haven't used before.