The halacha is that one should hear every word of the megila (Mishna Brura 690:5) since
according to many poskim (incl. the Rashba, Ran, and others), if one
misses hearing even one word of the Megillah, one has not fulfilled
one’s obligation (see here).
At the same time, one is not permitted to talk at all while the Megillah is being read and until after the blessing of "Harav et riveinu." (see here) based on SA OC 692:2
In the case where one spoke briefly but heard all the words, it seems from the Kaf Hachaim (692:22) and Mishna Brura 692:9 that one is not required to repeat the megila if he didn't miss a word.
As always, do not believe what strangers write on the Internet and ask your rav.