MP3 files can be created using Audacity:
These can be downloaded on the recorder module, which appears to the computer like a disk drive:
Below:
In normal operation, the MP3 is played when the button is pushed.
Instead, a 3V relay contacts are used to simulate a pushbutton.
In this example, when the ultrasonic sensor is triggered, Pin 16 is momentarily brought, simulating a pushbutton, triggering the audio player, then reset.
The second 'while' loop is to prevent continuous retriggering of the audio.
Note: This example uses Bluetooth radio, but the HC-12 could be used instead if greater range is needed.
Below: When receiver receives the word 'alarm', happy face shows for a few seconds.