In my first year "Sounds of Language" class, one of the things we do is look at phonetic vs phonemic inventories. I've just had a question about this on the discussion board for the module so I thought I may as well post my response, in case anyone is interested.
Sounds pattern differently in different languages. Speakers of two languages may produce exactly the same set of speech sounds - or phones (phonetics) - when talking, but the languages may use those sounds differently to create meaning. Once we're talking about meaning, we are considering phonemes.
Say, for example, there are two languages whose speakers produce the consonant sounds [p] and [b] and have one vowel, [a]. In both cases, the phonetic inventory contains [p], [b] and [a]. We put the sounds in [] brackets to indicate we are just talking about how the sound is produced at the moment.
The only thing which is different between [p] and [b] is voicing; [p] is voiceless and [b] is voiced. Otherwise, they are both bilabial plosives.
In language A, [bapa] and [baba] mean different things - [bapa] means "red" and [baba] means "yellow". [bapa] and [baba] constitute a MINIMAL PAIR, as only one sound differs between the two and it changes the meaning of the word. We can therefore say that /p/ and /b/ are phonemes - meaning units - because of this change in meaning, and we now put them in // brackets. There are TWO consonant phonemes. Thus, the phonemic inventory is /p/, /b/ and /a/.
In language B, however, [baba] and [bapa] both mean the same thing - they both mean "car". This means that it doesn't matter whether the consonant is voiced in language B. As there is no change in meaning when one substitutes [p] for [b], they are NOT different phonemes but belong to the same single phoneme.
What we have to do for language B is decide which sound represents the phoneme, and we often choose the one which occurs in most environments. As we don't have a lot of data here, let's go with the phoneme being /b/ (as there are more of them). That phoneme contains the two sounds [p] and [b], which are ALLOPHONES (phonetic variants) of /b/. Thus, the phonemic inventory is /b/ and /a/.
This is a very limited set of data, however!