I am running Node-RED in Docker.
I am sending text to the Exec node to enable speech output.
Text is "Speaker_in_PC_Room" and the command is espeak -s 130 -k3
But I get the errors on the image below.
Is it that it doesn't know how to process bash or is it that it can't access Espeak software within Docker ?
I know it's a long shot on here but I am not certain which one is at fault.
are you 100% certain it is installed inside the container?
perhaps you need to supply the full path to espeak e.g. /some/path/to/espeak -s 130 ... (of course only you will know where that is by looking inside the container)
I don't think espeak is installed within Docker, I have tried to add it via a terminal but I get an error.
First i tried to update and got ... apk update ERROR: Unable to lock database: Permission denied
I have been unable to find out how to get permission as I have installed Node-RED from compose.yaml file.
I believe i am correct in accessing it via terminal as below ?
If I get past this I may be able to do apk add espeak
and then in the terminal i got line and lines and like this ...
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5181:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5181:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5181:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5704:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
Perhaps Alpine linux does not have sound driver or does it need configuring ?
You need to add a sound device probably. Sound? so If it was me I would run my nodered docker container like this:
docker run -d \
...your options....
--device /dev/snd:/dev/snd \
gb-node-red-1
this is an example ... might work but you need to do more reading unless somone else has done espeak before...
also I dont use compose.yaml for my docker needs. I can read it. Then I make my own one liner for running command in terminal. You will need to add the --device option to your yaml file.
NOTE: this assumes your running docker on a unbuntu / debian based distro and not windows or mac.