I try, and have on occassion done a good job of it, but I'm nowhere near as talented with voices as some DM's I've meet. In fact, I consider it one of the areas of good DMing that I most need to work on.
What I'm much better at than 'voices' is varying the speaking pattern and vocabulary of a character. My lowlife can speak in a clipped gutter cant spiced with curses. The educated will speak in a more formal and expansive manner. Country folk will speak with a twang and offer lots of rural homilies, and so forth. Introverts and children will punctuate their talk with verbal tics ('eh', 'um','ya').
If I want to have an NPC with a very distintive speaking pattern, I have to 'study' it ahead of time and I'm not really good enough at it to keep several distintive speaking patterns in my head at a time. So, actually my PC's tend to be more strongly vocally characterized than my NPC's.