PRONUNCE A PHRASE IF THE ALARM IS PRESENT

Ok, I just want to know if I can make a device that:

  1. Sense the sound of an alarm
  2. If the alarm is positive, pronunce a phrase (or play an audio file)

What I want to do is to order Amazon Alexa to turn off a smart plug if the alarm activates.

Can I do that? What sensors or piece of hardware do I need?

Thanks in advance.

  1. Sense the sound of an alarm

In what sense? Determine that an alarm is making noise? Determine that the noise being made is being made by the alarm?

  1. If the alarm is positive, pronunce a phrase (or play an audio file)

With the appropriate input, and the appropriate hardware, that will be easy.

How do you expect the output to be heard over the alarm?

Can I do that?

I suspect that it can be done. Whether you can do it, or not, is a different story.

What sensors or piece of hardware do I need?

An mp3 or wav shield to make the appropriate output noises happen would be the first thing I’d get.

Then, I’d learn how to make the device play the “Oh my god, i’m on fire” track once a minute.

Then, I’d learn what that track needed to sound like to make Amazon Alexa turn off the switch.

When I could have the Arduino make Amazon Alexa turn the switch off, while I manually (or by swearing at Amazon Alexa) turned the switch on, AND I had answers to the first set of questions, then I’d know what kind of sensor I needed to determine that the alarm was going off.

Personally, I think that “listening” to the alarm is the worst possible way of determining that it is going off.

Thank you for your response, I think same of you. But how could I make the device reconize that the sound is the alarm? The alarm is not so loud so there would be no problem that Alexa hear the command if the speaker keeps close.

But how could I make the device reconize that the sound is the alarm?

Well, now, THAT is the hard part. If you are using a microphone to listen, then all you can do is determine whether the reading (or series of readings) you get from the microphone exceeds some threshold. But, that won't tell you that the sound came from the alarm. Could be the next door neighbor's dog barking, instead.

Really, there must be some other way to tell that the alarm is going off. Of course, that might involve hacking the device with the alarm, which you may be reluctant to do. In which case, you should not be relying on a convoluted process to keep from burning your house down.