If it is the object of a sentence (i.e. if there is already a subject in the sentence) or phrase, or is the object of a preposition, then it should be whom; if it IS the subject, then who. In this case, whoever is substitute for the ‘me’ in the original sentence (“Are you talking to me…?”) so it should be whom. You wouldn’t say, “Are you talking to I…?” The sentence could be written, “To whom are you talking…?” You (in both cases) is the subject, so it has to be whom.
If it is the object of a sentence (i.e. if there is already a subject in the sentence) or phrase, or is the object of a preposition, then it should be whom; if it IS the subject, then who. In this case, whoever is substitute for the ‘me’ in the original sentence (“Are you talking to me…?”) so it should be whom. You wouldn’t say, “Are you talking to I…?” The sentence could be written, “To whom are you talking…?” You (in both cases) is the subject, so it has to be whom.