San Francisco (CNN Business) For Amazon, getting Alexa's new security-guard feature to work meant literally breaking a lot of windows.

In December, the company started inviting Amazon Echo users to try out Alexa Guard, a new setting that turns the smart speakers into home security devices. It listens for suspicious sounds when you're away and sends a smartphone alert if it detects, say, a window breaking and a possible break in.

According to Prem Natarajan, vice president of Alexa's AI division, Amazon employees had to destroy different types of glass, such as window glass, wine glasses and drinking glasses, with tools like baseballs or hammers to train the technology.

Considering most of us have all kinds of glass things in our homes, it was important for Alexa to learn the difference between a cat knocking over a wine glass and a burglar smashing a living-room window.

"You don't want [Alexa] to respond to any glass breaking," Natarajan told CNN Business.

Read More