Assuming you don't miss.
A firearm is a much safer tool for personal self-defense, especially home-defense.
Knives are highly dangerous to their (usually untrained) users, bats have the same issue: you're getting too close to the threat. Also, these mechanisms of self-defense are widely seen as heinous. If you stab someone, bash their head, even in self-defense: that's a heinous and inhumane way to defend yourself.
Tasers have the limitation of a slow-moving (harder-to-aim) projectile that may-or-may not penetrate clothing (it certainly won't penetrate heavier leather, etc.).
Assuming you don't miss (in which case you're not going to be able to fire again with the civilian-oriented tasers), you are praying that it's enough to actually stop the threat.
What if there is more than one assailant?