[orca-list] Sapi with Wine, Netcat, SpeechDispatcher and ActivePerl?



Hi, 
here's one way to get SAPI support for Linux, theoretically: 

a. Write a simple Win32 based speech server in Perl (or Python), say
communicating over UDP sockets, that hosts the default SAPI 5 voice and
accepts commands derived from SAPi properties such as voice, rate and
volume, as well as an instant mute, "maybe by sending an empty string.
I've  done this bit. 

b. Compile that server to a Win32 executable for a stand-alone
installation.  Install the SAPI 5 run time, the user's favorite synth
and the said exe  under Wine. 

c. Make Orca run with speech dispatcher, and using the generic output
module  run a mini shell script on speaking content. That script could
echo the  synth params and stuff being said, pipe them to netcat (nc),
which would  send them to localhost to the Win32 based SAPI server, and
on getting the  kill signal, sen the server the stop command. Such a
shell script will be  much quicker to launch than a dedicated Python or
Perl app on the client  side. 

The net result of all this is that it would allow the user to use his or
her  favorite SAPI synth and voice under LInux in Orca relatively
easily. This is  very important for many, I think, or would be for me at
least. Personally, I  honestly cannot fairly judje Linux and windows,
unless I can get to use a  speech synth I've gotten equally used to.
Else Linux will feel worse for the  wrong reasons, since it is twice as
fast for me to use my commercial win32  only synth- I aint kidding. 

Another benefit is that the synth could also be used in EmacSpeak. Of
course, there's the problem of how the user gets the SAPI synth set up
in  the first place, since I reckon NVDA doesn't run under Wine, does
it? Maybe  this could be scripted via UI automation again using Perl,
for instance,  I've done things like that. 

In fact, since I suddenly had this idea a couple of days back, I thought
of  trying it out since it would absolutely rock if I got this done some
day.  But the only bit of the equation I know well enough to do decently
myself is  SAPI and ActiveState Perl in Windows. I'm a Perler and Lua
programmer, not a  Pythonic. I've spend a couple of hours writing a very
crude, naive  implementation of the server side, which is 100 lines of
Perl running under  ActiveState Perl 5.8.8 and have tested that I can
send parameter changes and  text to be spoken from my Linux machine.  It
should be compilable with  perl2exe, too. If anyone might find the code
useful say for testing the Wine  side, and mind you this is a very very
quick hack, drop me a line off-list. 

So if anyone has the same goal and feels they're up to  solving some of
the rest, please get back to me. If this is too OT for the list, you can
also get back to me  directly. As for the things to be done. There's the
huge challenge of getting Wine and  SAPi working in the first place. I
know it can be done, since someone ran  Text Aloud in Wine, as evidenced
by: 

http://www.texttospeechblog.com/2007/02/windows-tts-on-linux.html 

As to Wine, going through a custom GUi full screen magnified is
extremely  slow for me, too. Obviously having a sighted mouse user
around would be  mightily helpful. Then there's installing speech
dispatcher and configuring the generic output  module: which should be
easy but the only Unixisms I know are Perl and basic  Gnu commands. I
managed to mess some rights when I tried to install  speech-dispatcher
and configure the generic output module, so obviously I  need to
reinstall it or something it won't even run as root, oh well. 

I also  lack any bash knowledge, unlesss transferable from Perl, so that
I could do  a script that does the netcatting, and sends the server a
stop command on  getting killed. This should be trivial, however. Any
comments appreciated. 

--  
With kind regards Veli-Pekka TÃtilà 
Accessibility, Apps and Coding plus Synths and Music: 
http://vtatila.kapsi.fi
 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]