mwsay

This script written in python retrieves the wav file from Merriaw-Webster Online and launch a wav player to execute it.

The license is the GPL.

The source file is here.

It uses a cache to store retrieved files, and require no other program but a wav player.

You'll need the python interpreter to execute it.

I've written it with Python 2.1 on GNU/Linux.

I think it could be adjusted easily to work with an older python version, and no I have no idea if this can work on windows.

To install it, just copy the file somewhere in your path, make it executable, create the cache directory with the correct ownerships permissions (the users executing wmsay must be able to write there, and modify these lines at the top of the script to match your settings:

cachedir="/var/cache/say"
playcommand="bplay %s"

The usage is simply "mwsay word", for example:

alain ~ $mwsay python
Getting '/cgi-bin/dictionary?book=Dictionary&va=python' at host 'www.m-w.com' ... size=20061
Getting '/cgi-bin/audio.pl?python01.wav=python' at host 'www.m-w.com' ... size=2344
Getting '/sound/p/python01.wav' at host 'cougar.eb.com' ... size=6930
Playing WAVE : 8 bit, Speed 11025 Mono ...

Ask me if you have a question.