This is an article from a “superyacht insider”. The whole article is interesting, but I’ll quote this part:
“I’ll never forget the wide-eyed horror of one captain as he recounted how he had to deploy a 70m yacht’s arsenal of onboard security (think sonic weapons that deliver ear-splitting, high-volume acoustics and “pain rays” that transmit a narrow beam of electromagnetic energy to heat the skin and cause an unbearable burning sensation) to try to evade Kalashnikov-wielding pirates speeding towards him on Ribs in the Arabian Sea.”
Yep, this is effective, even against Kalashnikovs. If you have enough money – and most who own a multi-$100 million yacht do – it is no problem to incorporate custom weapons into your ship. And of course, making them non-lethal is better, at least for the first round of attack.