Kyle R . Burton on Sun, 19 Nov 2000 21:19:31 -0500 (EST)


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

Re: [PLUG] dynamic file (script output)


> OK then, why do you want to do this?  What's the advantage of being
> able to cat the file instead of just executing it directly?


I worked [briefly] with a project [speechd] that basicly implemented a FIFO,
to which a process could write some text:

  echo "Hello Computer" > /dev/speech

and behind the scenes, there was a process that was waiting for you to
write to that FIFO, when you did, it took your text and fed it through
a text to speech engine (like festival or rsynth) through what ever 
convoluted api the text to speech engine used.  This simple intrface
made it really easy to have stuff like a cron job that had the computer
tell you what time it was, or to hook it into procmail to speak
the sender and subject line of inbound email, or whatever.  One of the
problems with it is the recycle time for the FIFO -- once the process
read from the FIFO, and closed it, when it went to open it again, there
was a recycle timeout it had to wait for -- so there was a timeframe in
which it couldn't listen to stuff being written to the FIFO. 

The other problem (more serious) was that when multiple processes all
wrote text to the FIFO at the same time, it got interwoven/interleaved.
This made things sound really, really strange.  I tried to research how
to fix this, and the only thing I could find that reliably solved the
problem would have been to write a kernel module.  I started down that
path, but got busy doing other stuff, so it never came to fruition.

k

-- 
------------------------------------------------------------------------------
"From a certain point onward there is no longer any turning back.  That is the
 point that must be reached."   -- Kafka
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug