You’ve probably heard the phrase “said is dead.” I don’t think it is dead, but you should be cautious of overusing ‘he said’ for no reason.
You should attribute who said what for only 2 reasons
1. The reader would be confused about who is talking
2. It advances our knowledge of the plot or character
If I write a regular dialogue, which I define as two people talking, it becomes pretty obvious who is talking, especially if the characters are well developed.
When there is Trialogue, which is what I call a verbal threesome, things are naturally more complicated and so reminding the reader who is talking makes perfect sense and peppering with the occasional said will clear up any confusion.
I try to separate dialogue attribution and plot or character development attribution because they can step on each others’ toes.
New writers tend to have their characters grinning at each other a lot –
“I’m going to go now,” Edgar said as he stood up and grinned at Caroline.
The attribution doesn’t advance the plot and is too simplistic, the action also doesn’t echo the dialogue. Don’t give away important details with mere dialogue attribution. I might change that to something slightly more interesting …
“I’m leaving.” Edgar’s voice echoed down the hall, but he gave Caroline a reassuring smile when he saw the look in her eyes.
Here we’ve learned something about both Caroline and Edward, Caroline has a crush on Edward (at least according to Edward), and also that Edward is sensitive to her crush. I don’t need to tell the reader that Edgar is talking because the context of the surrounding text makes it obvious.
I could add a lot more flowers, I guess, to further illustrate how Edgar’s words affected Caroline, but I think echoed is just enough. It won’t go down in history as the all-time best sentence ever, but it moves and reveals in one swoop.