I suspect that I will not use the right terminology here. Apologies in advance.
Is there a word for the phenomenon in which speakers of a language treat two different sounds as equivalent, even though they can hear the difference between them?
One situation in which this occurs a lot is when speakers of the same language have different accents (e.g. from different regions, economic classes, etc.), and these accents pronounce some corresponding sounds differently. The speakers can hear the difference, but they treat the sounds as equivalent.
(For examples, certain dialects of Spanish pronounce the word jamón (tr: ham) like xaˈmon, while others pronounce it like haˈmoŋ. In other words both the initial and final sounds differ between the two versions. Most native speakers can hear these differences, but they disregard them; that is, they treat xaˈmon and haˈmoŋ as the same word.)
Is there a name for this equating of sounds that are perceptibly different?
Note that the phenomenon I'm referring to here should not be confused with the case in which someone is unable to hear the difference between two sounds.