An ideal compensator model of speech perception