There is not doubt they could do it, but to counter threats made by a vessel in line of sight would not win them any prizes for brilliant thinking or utility.
The chances of any vessel warning the US Navy that is it is going to attack them is only credible to gullible.
If it were anyone but Iran, I'd agree with you. With Iran's habit of exhibiting odd behavior, and our history with the USS Cole in Yemen, the actions of these Iranian boats was indeed threatening and it was meant to be, with or without the audio.....