2

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.

Yusufk
  • 161
  • 6
  • The command posted will send the standard output from runme.py to the standard input of espeak. – ash Jan 09 '14 at 17:58
  • So, what is the problem? – ash Jan 09 '14 at 17:58
  • I'm guessing then that I have some other issue, perhaps with the Raspberry Pi I'm running this on, because I should be hearing audio, but I don't. – Yusufk Jan 15 '14 at 15:01

2 Answers2

1

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.

0

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
Yusufk
  • 161
  • 6