I'd like to interact with an AIML interpreter that runs on the command line (Howie) using standard input and have the output played using espeak.
I've tried:
./runme.py | espeak --stdin
No success yet.
I'd like to interact with an AIML interpreter that runs on the command line (Howie) using standard input and have the output played using espeak.
I've tried:
./runme.py | espeak --stdin
No success yet.
Perhaps, you can try to write the stdout to a file with tee and then use espeak -f to have it spoken.
so, for example if my script script.sh returns something,
./script.sh | tee >> output ; espeak -f output && rm output
would first write all the contents written to stdout. However, it would start speaking only after completion. The file written will be deleted later on too.
I managed to achieve what I wanted:
echo "Welcome to the lab $(cat /var/mail/pi|grep "was granted entry" |grep -v "<p>" | sed "s/ was.*/ /"|tail -1 | awk -F ", " ' { t = $1; $1 = $2; $2 = t; print; }')" |espeak -ven-us+f4 -s150 2>/dev/null