At the entrance comes the word, for example:
var name = "космос"; And there is the right word:
var result = "космос"; It is necessary if the name == result returns true, but consider such options: name = "козмос/космоз/космас" and so on. How can this be done? That is, you need to remove such typos when voice dialing.