Raspberry Pi Speech Synthesis

This code works well to access php server on pi. I modified it to give me several different commands so that I can choose what it says with each door opening. I ended up using Google Translate TTS as it sounds much better than any on Pi options.

Also, I modified the “tones” to play a random song on the pi from a list of MP3 that I can update via Samba file share.

Now I just need to come up with a smart app to play the tone when the doorbell button is pushed and assign a TTS command to each door sensor.