- 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?
- 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.