The answer is way more than just sound = wave.
The 'waves' you are referring to are waves of changing air pressure that impact on a small membrane in your ear. The ear membrane, through a mechanism so amazingly complex that to some people proves the existence of God, connects through nerve fibers to the brain. What we perceive as sound is the firing of neurons inside our brain.
Now, with that established, we can go back to your question. A recorder works in a very similar way. It has a membrane (microphone capsule/diaphragm) and a mechanism for turning the movements of the diapgrahm into electrical energy which is sampled and stored for later reproduction.
When the energy is reproduced, it is transmitted to your ears through the air by using yet another moving diaphragm (speaker) to re-introduce these energy fluctuations into the air which in turn are picked up by your ear and we are back at step one.
At no point in this process has there been any need to discuss exactly what you are listening to as this is not relevant to the recording process. This is only relevant when your brain processes the electrical impulses received from the ear.
Any perception of "aaaaaaaaaa" and "oooooooo" is a brain matter and entirely unrelated to the recording process. The recording device doesn't know and doesn't need to know.
The additional part of the answer is to say that your assumption that the waveforms are the same is not correct.
There is a significant difference between the waveforms produced when you say "aaaaaaaaaa" and "ooooooo". A sound is generally going to be a combination of many waveforms and the distinct components will have different amplitudes and phases. Whereas the 'fundamental' (lowest) frequency component may be the same, the higher harmonics will be much different and will have different phases and amplitudes.