The study of the sound system of a language, comprising of phonemes, allophones, sound patterns, and rules.