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.

  • The command posted will send the standard output from runme.py to the standard input of espeak. – ash Jan 9 '14 at 17:58
  • So, what is the problem? – ash Jan 9 '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
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
| improve this answer | |
0

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.

| improve this answer | |
New contributor
Samarth Ramesh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.