AIs like Siri and Alexa respond to their names being called. How does the system recognize the name by ignoring all the other words that have been said before their name? For example, "Hey Siri" would trigger Siri to start listening for commands, but if a user said "hey how are you hey Siri" the system will ignore "hey how are you" but trigger the system to "hey Siri". Is it because their listening function reloads in milliseconds or even nanoseconds, or is there a different way it works?
Is it because their listening function reloads in milliseconds or even nanoseconds
Yes, it expects the keyword to start every moment of time and it ignores the rest.
Overall, the algorithm is described here, you can read for details: