The "a front end is not available" error typically occurs when you try to run a command that requires the graphical user interface. Are you calling mathematica
or wolfram
? You need the former.
Are you asking M to speak the words "The dark knight" or the output of WolframAlpha["The Dark Knight"]
? I suspect you don't want the latter; however your function runs as expected in my RPi.
Never used Pico TTS so can't say anything about it.