If you understand a bit about PHP you can use it as your definitive plugin
argument 1 = c:\blablbalb\script.txt
argument 2 = fisrt argument passed to script
and so on...
script.txt will be a php script,
> to catch the arguments 2 use $argv[1]
> To return variable to IVM use:
print "variable=value
&variable2=value2
&variable3=value3";
http://www.php.net/manual/en/features.commandline.php
As for the speech:
Select in the OGM > advanced > voice synthesis of script ( script = those comments is the "mesage" tab)
as comment use %somevar%
make a plug-in return: somevar=wow thats easy
Thats it!