From Chicago Manual of Style
Would you add a comma before the quotation marks in the following sentences?
Ellie finally admitted, “They look different from before.”
Kat set the painting on the windowsill, muttering “One more to go.”
It would be more accurate to say “I made it up” than “I exaggerated.”
Mimicking Hector’s level of sass to perfection, Bel said, “Try to keep up.”
The Chicago Way
It’s a writing tradition to put a comma after a word like “said” when it introduces dialogue or a quotation. CMOS 13.14 has this to say:
When it is simply a matter of identifying a speaker, a comma is used after said, replied, asked, and similar verbs to introduce a quotation. Such usage is more traditional than logical.
Garrett replied, “I hope you are not referring to me.”
Sandip writes, “What they did was courageous, if silly.”
The key words in that advice are When it is simply a matter of identifying a speaker. CMOS 13.15 explains when a comma is not needed before an opening quotation mark:
When a quotation introduced midsentence forms a syntactical part of the surrounding sentence, no comma or other mark of punctuation is needed to introduce it.
Donovan made a slight bow and said he was “very glad.”
One of the protesters scrawled “Long live opera!” in huge red letters.
She said she would “prefer not to comment.”
Back to the Q
Taking Chicago’s advice, all four sentences are correct as they are shown.
The middle ones don’t need a comma because “muttering” and “say” are not directly tagging a speaker.