You have to tell them, but only when they're about to try.
They don't waste an attack by making a speed attack, because they can't make a speed attack. As soon as the hero announces that they're going to make a speed attack, the traitor must tell them that they can't, and they carry on with their turn. However, they may have already wasted some time getting into a position to find this out.
Unfortunately due to how Betrayal is made, there's no rules reference to clarify this specifically. While it's not identical, there's a similarity in the "Make an Attack" rules (page 13):
You can’t use a trait to attack an opponent who doesn’t have that trait. For instance, if a monster doesn’t have Sanity, you can’t make a Sanity attack against it.
It's not that the attack just fails; you can't even try it. You might not know that the monster doesn't have Sanity until you tried to attack with it, and the traitor says "you can't, it doesn't have Sanity." In that case, you haven't made an attack yet.
This is distinct from monsters that are immune to, or can't be damaged/stunned by a particular type of attack, as they can still be attacked in that way.