Thanks RDaneel, that works perfectly. For reference sakes, the timing is in the order of miliseconds before the sound plays.
However I have encountered a slightly strange behavior. For simplicity, the script is simply pulling a LED high with python and RPi.GPIO. A few seconds after booting, the LED turns off. On the other hand if I run the script manually it stays on permanently (aka I only tested longer than a few minutes). I’m not sure if this has something with how the script is written or how it is initialized as a service. I’ve pasted the script’s code below, service file is exactly as linked.
[code]import RPi.GPIO as GPIO
OPTO = 21