On Sun, 03.01.10 14:21, Colin Guthrie (gmane at colin.guthr.ie) wrote: > > 'Twas brillig, and Ng Oon-Ee at 03/01/10 13:26 did gyre and gimble: > > So, in my simplistic and user-centric point-of-view, I wonder if > > speechd-up accepts audio INPUTS? Perhaps it could act as a pulseaudio > > sink, with the appropriate modules, of course. It starts before the user > > logs in and only exits after the user has logged out, of course. > > > > The reasoning behind my proposal is simply that root is system-wide by > > definition (in my understanding), hence why all Colin's proposals have > > involved speechd-up running as a particular user while all your replies > > have mentioned root access to pulse.... > > > I guess a possibility is the following: > > 1. Make console-kit aware of the "idle" state as before. > 2. Make the speechd-up or speech-dispatcher "headless". i.e. all they do > is open a pipe (fifo) and pump their synthesised speech to it - they do > not actually output audio itself. > 3. Write a PA module that acts as a pulse client that opens that pipe > and outputs the sound (in actual fact, we could use a combination of > module-pipe-source and module-loopback for this without writing a single > line of code in PA). > 4. Place a script in: > /usr/lib/ConsoleKit/run-session.d > or > /etc/ConsoleKit/run-session.d > (I'm not sure which is best) > which basically does the following (see /usr/bin/start-pulseaudio-x11): > > /usr/bin/pulseaudio --start --log-target=syslog "$@" > /usr/bin/pactl load-module module-pipe-source source_name="a11y" > file="/tmp/a11y.socket" > /dev/null > /usr/bin/pactl load-module module-loopback source="a11y" > /dev/null > > > (or something like the above - I could have gotten arguments wrong and > you may want some channels/rate etc. stuff going on). There may also > need to be something setup to stop PA from exiting after an idle timeout. > > > With all that in place things may just work. Obviously speechd-up would > have to support multiple clients opening the /tmp/a11y.socket file (and > it probably shouldn't actually be in /tmp!). > > Does that fit better with your model of things? Not sure i am convinced. You'd need to switch which PA instance actually plays back audio when the session changes. Othewise all sessions would play (or try to play) audio at the same time. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4