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

[SpeechIO-9] the right way to implement /dev/speech




I think most of the time most of us have agreed that our current
implementation of /dev/speech is not optimul.  Sometimes I've thought it
should be implemented within speech synthesis systems (like festival),
sometimes I'v felt that it should be a kernel module.

But I just remembered something.. within the last 24 hours that made me
think (which I'm guessing I've thought before) that we are actually doing
it almost right (written in perl & using a FIFO (not a real device) in
/dev).  

The biggest (one ?) argument against the perl+FIFO thing has been dropping
lines, I think.

Well, I think the biggest argument for using this method is gpm.  Yeah,
the program that lets you copy & paste w/ your mouse on the console.  

If you have a serial mouse, that device can be accessed by multiple
programs simultaneously.  gpm can be accessing it from the terminal while
X is accessing the mouse directly itself.

If you have a ps/2 mouse, only one program can access it at a time (no
idea why).  So to make it possible to use gpm & X simultaneously, gpm
creates a FIFO called (I believe) /dev/gpmdata.  You then tell X that your
mouse device is /dev/gpmdata.  X is reading mouse input from a FIFO, which
is getting output from the gpm program. The same kind of file we're
polling for text with speechd.  This wouldn't work if the best a FIFO
could do is polling every 2 seconds & missing some data (like speechd). So
I figure there's gotta be a better way of doing it, with perl & a FIFO.

__________________________________________________________________
PGP fingerprint = 03 5B 9B A0 16 33 91 2F  A5 77 BC EE 43 71 98 D4
            darxus@op.net / http://www.op.net/~darxus
                         Far Beyond Reason