Slimboyfat, yes, race has a lot to do with different accents in America. African American Vernacular is a distinct dialect in the US. If you hear this accent on the radio, for example, or on a TV when you're in another room, you know that it's an African American speaking. There are also some telltale vocabulary and sentence structure that, if you're in tune to that sort of thing, you can tell from their writing (such as on this forum) if the writer is African American.
Here's the thing, though, most African Americans also speak the General American accent as well for formal use. Just like the local Baltimore accent (which is very working class)I wrote about earlier is often used informally, but then speakers switch over to General American for formal situations like work.
So, if you hear a race or class based pattern, you can identify it, but Americans are also really good at switching over to the General American accent ( which often sounds midwestern) that just because you don't hear it doesn't mean that the speaker is definitely not African American for example, or working class.
I can speak with an Eastern Shore twang when I'm home, but switch right over to the standardized General American accent when I'm teaching or at the grocery store or other more public place.