This question already has an answer here:
When listening to a recording of your voice, it often sounds higher pitched than when you were speaking. This has been well researched as being caused by you being able to hear some of your voice as vibrations through your bones, where the sound is lower. In a recording your skull does not vibrate, leading to less bass, so your voice sounds higher.
However, it seems fairly easy to match the pitch of someone singing next to you. How is this possible when your own perception of your voice is lower than what other people perceive you as?