Getting sound from programs run from Terminal

Hi, I am a new user having bought a 2018 Kano for my son. Mostly things are ok so far, but there is an issue that I would like to get to the bottom of.

Sound through HDMI to the telly is clearly all working fine, as the sound when the GUI starts up plays, as do the blips as you move through the screens. All apps so far seem to work fine also.

The issue is anything running from Terminal. For instance, using the espeak (text to speech) or aplay (play wav files), the commands run, but there is no sound.

I did manage to get it working by first launching Sonic PI, then launching a new terminal window. So there must be something that Sonic PI starts up which these other programs make use of for sound.

Does anyone know if there is another command to run from the terminal window first to get sound, I’d rather not have to launch Sonic PI (which appears buggy) every time.