Exec node fails with error:127 ... any ideas why?

Hi,

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.

Thanks

It looks like bash cannot find espeak.

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)

Hi,

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

Thanks for your help.

18

This will get you into the container as a root user

$ docker exec -it --user=root gb-node-red-1 /bin/sh 

Then try to install it

$ apk add espeak

I think I have installed it ... i used

docker exec -it --user root gb-node-red-1 sh
/usr/src/node-red # apk add espeak

Not sure if this is the correct place ?

Then i tried espeak "hello, world"

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 ?

Thanks

oh-boy ... I did not know what espeak was . I just know how to install things to a node-red docker image.

Ive added system devices to docker before. Look at this documentation:
https://docs.docker.com/engine/reference/commandline/container_run/#device

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.

Do you need to use docker? Often life is much easier without it.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.