speechd-discuss
[Top][All Lists]
Advanced

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

Porting Speechd-el to Win32?, Found a SSIP Implementation


From: Veli-Pekka Tätilä
Subject: Porting Speechd-el to Win32?, Found a SSIP Implementation
Date: Sat, 20 Sep 2008 15:42:25 +0300

Chris Brannon wrote:
> Veli-Pekka T?til? <vtatila at gmail.com> writes:
> > How difficult a task would it be to port speechd-el to Windows? Is the
> > only Nix-only bit of speechd-el the speech and Braille interface?
> Speechd-el is written entirely in Emacs Lisp.  It sends SSIP to a speech
> server.  Looking at brltty.el, I see that it communicates with brltty
> via TCP.  There's nothing Unix-specific about speechd-el.
Ah, great to hear that, very good design, I'd say.

> You found an SSIP implementation for Windows, so speech should work.
> If the Windows SSIP implementation is not faithful, you have another
> option. Run speechd-el on the Windows machine, and tell it to connect to
> an instance of Speech Dispatcher running on a Linux box.
An interesting solution, and this would even work virtualized under Windows. 
I'd lose Windows speech then, though. Or maybe not.

One thing I've toyed with is SAPI under Linux, the original idea being 
netcatting stuff in the generic speech-dispatcher output module to a simple 
SAPI server Perl program running under Wine. That worked in Windows fine 
when netcatting from the Linux terminal, and I even got SAPI running under 
Wine. However, the server Perl script refused to run under Wine presumably 
due to some unimplemented API that Win32::OLE uses.

Hey now I know, one could set up a minimal virtual Linux box whose only 
purpose in life is to serve speech-dispatcher clients. And whose only output 
module would netcat to my little (100 lines of code) server running under 
Windows. SO Speechd-el under Emacs for Windows asks the virtual LInux box to 
speak, who passes the ball back to the physical WIndows for actually 
speaking. Complex, but it just might work without much latency, either. You 
could rightly then ask, though, why not use Emacs under virtual Linux to 
begin with, get used to the speech, and just transfer code files between the 
physical and virtual machines through a shared dir. Maybe I should do that, 
on second thought.

Getting back to the current topic, though:

> Just try it and see what happens.  Tell us.  Personally, I'm betting that
> it will work out of the box.
It almost does. I get connected and all, but then the SSIP server crashes 
and Emacs freezes, with no trace of the SSIP crash in Dr. Watson. Emacs says 
that there was an error connecting to speech dispatcher. Looking at the 
logged output, I copy pasted seconds before it crashed, there seems to be a 
great many unsupported SSIP operations in the current implementation, but as 
long as I got some speech, that'd be still better than nothing. I can set 
voice, pitch, speed and such prefs graphically in Win32 anyway. THese 
differences in protocol sound fairly serious, though.

I have Emacs 22.1 for Windows, have two subdirs for eieio and speechd-el 
files under %appdata% and my .emacs file just adds those dirs to loadpath, 
autoloading speechd-el, too. I run the SSIP server like this:

C:\apps\ssip\SSIPVoiceServer.exe  /API=sapi  /port=6560 /loglevel=debug

I've also send the SSIP server author feedback, as mentioned on its home 
page:

http://www.remoteaccessbridge.com/ssip/

Finally, the logged output from the SSIP server follows. I've ripped with a 
regexp bracketed timestamps from starts of lines, since it made redundant 
listening with speech. Note that I'm running under SAPI despite the note 
about WIndowEyes (my reader is actually Supernova):

Log:
[DEBUG] Value of SSIP_PORT = [6560]
[INFO] Waiting for connection...
[INFO] Connected to new client
[INFO] Waiting for connection...
[DEBUG] Value of SSIP_OUTPUT_MODULE = []
[WARNING] Unable to load interface for Window-Eyes
[TRACE] New instance of SpeechManager created
[TRACE] New Session created - Client ID = 7364
[TRACE] API for client ID 7364 set to AUTO
[INFO] Client assigned ID 7364
[TRACE] Client Request: "SET self CLIENT_NAME vellu:Emacs:default"
[TRACE] SET SELF - CLIENT_NAME vellu:Emacs:default
[DEBUG] client identified as vellu:Emacs:default
[TRACE] Response Rec: 208 OK - CLIENT_NAME=vellu:Emacs:default
[TRACE] Client Request: "SET self VOICE male1"
[TRACE] SET SELF - VOICE male1
[TRACE] Response Rec: 501 ERROR - INVALID SET COMMAND SENT [VOICE]
[TRACE] Client Request: "SET self PUNCTUATION some"
[TRACE] SET SELF - PUNCTUATION some
[TRACE] Response Rec: 501 ERROR - INVALID SET COMMAND SENT [PUNCTUATION]
[TRACE] Client Request: "SET self SPELLING off"
[TRACE] SET SELF - SPELLING off
[TRACE] Response Rec: 501 ERROR - INVALID SET COMMAND SENT [SPELLING]
[TRACE] Client Request: "SET self CAP_LET_RECOGN none"
[TRACE] SET SELF - CAP_LET_RECOGN none
[TRACE] Response Rec: 501 ERROR - INVALID SET COMMAND SENT [CAP_LET_RECOGN]
[TRACE] Client Request: "SET self RATE 0"
[TRACE] SET SELF - RATE 0
[DEBUG] Client vellu:Emacs:default set rate to 0
[TRACE] Response Rec: 411 WARNING - SET RATE COMMAND NOT VALID FOR THIS API
[TRACE] Client Request: "SET self PITCH 0"
[TRACE] SET SELF - PITCH 0
[TRACE] Response Rec: 501 ERROR - INVALID SET COMMAND SENT [PITCH]
[TRACE] Client Request: "SET self VOLUME 100"
[TRACE] SET SELF - VOLUME 100
[DEBUG] Client vellu:Emacs:default set volume to 100
[TRACE] Response Rec: 412 WARNING - SET VOLUME COMMAND NOT VALID FOR THIS 
API
[TRACE] Client Request: "SET self LANGUAGE en"
[TRACE] SET SELF - LANGUAGE en
[TRACE] Response Rec: 501 ERROR - INVALID SET COMMAND SENT [LANGUAGE]
[TRACE] Client Request: "SET self PRIORITY MESSAGE"
[TRACE] SET SELF - PRIORITY MESSAGE
[DEBUG] client priority set to MESSAGE
[TRACE] Response Rec: 202 OK - PRIORITY=MESSAGE
[TRACE] Client Request: "SOUND_ICON start"
[TRACE] Response Rec: 281 OK - SOUND QUEUED "start"
End log.

Hth.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]