Notes for when running on the Raspberry Pi with the Rasbian Buster OS.
When using Java 11 OpenJDK, you may find the audio from the Text To Speech coming out the HDMI port instead of the selected 3.5mm Audio socket on the side of the Raspberry Pi.
This is caused by Pulse Audio not following the requested settings and routing the audio from the Java apps to a different output, the HDMI like it or not.
The solution is to edit the Java file.
sudo nano /etc/java-11-openjdk/
You will need to add in the following lines into the config:
Make sure you don't have the # in front of the lines.
Reboot the Raspberry Pi.
sudo reboot
Make sure you selected the 3.5mm Audio jack as your output device:
press F6 to select the sound card you want as the output.
Select 1 Headphones.
now change into your MRL directory and start MRL the way you normally would.
There had been a similar issue with the Java 1.8
Edit the
sudo nano /etc/java-8-openjdk/
In that one, you had to comment out the following line:



and uncomment these ones:

I hope this helps any one having issues with the audio output on their Raspberry Pis :-)