This is a program to convert incoming MQTT message to Morse code. Admittedly, not very useful, except for perhaps learning to communicate in Morse.
Hardware-wise, all you need is an ESP8266 or equivalent, with a speaker attached to port D2 (GPIO4). A transistor amplifier will make it louder.