Each character you write will have their own way of speaking and their own vocabularies which will change subtly depending on their circumstances. As a writer we need to be aware of this and not write one universal vocal pattern for all our characters. It should be clear from the way the language is spoken - the rhythm of speech, the vocabulary used - which character is talking without the need for dialogue attributions.
Try this... Write a short bit of dialogue as two dukes meet and discuss the weather. Now write another bit of dialogue with two dustbin men meeting up and discussing the weather. Now write some more dialogue, but this time it's with a duke and a dustbin man meeting and discussing the weather. Each time, hear their voices in your head before writing. The dukes don't have to be upper class twits, not the dustbin men Gorblimey Alfred Doolittle types, but try to make it clear from the way they're speaking who is speaking. Capture the flavour of their speech.
In case any one is interested, I'm running a class in Bath on Friday afternoons for 8 weeks over the summer, a mix of exercises and workshopping. Contact me for more details on email@example.com