Boy, me too...especially during a lecture with over a 100 students. Whenever students talked during lecture to the point where I could see it was disturbing those around them, I would tell the offending students to stand up and tell the rest of the class what they were talking about since it was obviously more important to them than what I was saying. Rarely did I have to do it a second time during the semester.
When my wife was teaching psychology to college freshmen and she ran into this, she would ower her voice and start focusing her lecture to the people in the front few rows.
And human nature being what it is made the folks in the back rows fear they were missing something. Amazingly it worked. When the people in the back rows wanted her to repeat what she had said, she told them they’d have to catch up on their notes from the folks in the front. During the class break.