dragora-users
[Top][All Lists]
Advanced

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

Re: [Dragora-users] eSpeakup on Dragora


From: Thiago
Subject: Re: [Dragora-users] eSpeakup on Dragora
Date: Wed, 10 Jan 2018 15:13:58 -0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

Em 09/01/2018 22:53, Thiago escreveu:
I opened the initrd provided in the debian iso, and all the synthesizer parts of Speakup are compiled as modules. I checked also the modules.builtin file in /lib/modules to see if something is compiled inside the kernel directly and no, all modules are built outside the kernel and loaded dynamically.
Following the previous message, I found today the scripts that start up Speakup on the Debian initrd image. They are located at /lib/debian-installer-startup.d/. The first starts Speakup, the other starts eSpeakup.

The first file is:
S37speakup
SYNTH=$(sed < /proc/cmdline -n -e 's/.*speakup\.synth=\([^ ]*\).*/\1/p')
if [ -n "$SYNTH" ]; then
        modprobe speakup_$SYNTH
        debconf-set debian-installer/framebuffer false
        register-module -i speakup_$SYNTH
fi

And now the other file:
S38espeakup
if lsmod | grep -q speakup_soft; then
        # Give drivers some time to detect boards :/
        sleep 2
        N=$(ls /sys/class/sound/card*/id | wc -l)
        case $N in
                0)
echo No sound card detected, can not do software speech synthesis... Press enter to continue anyway.
                        read
                        ;;
                1)
                        # Just one card, can not be wrong
                        echo 0 > /var/run/espeakup.card
                        /usr/bin/espeakup > /var/log/espeakup.log 2>&1
                        ;;
                *)
                        # Several cards, make the user choose
                        CARD=none
                        while [ "$CARD" = none ]
                        do
                                for i in $( seq 0 $(($N-1)) )
                                do
ALSA_CARD=$(cat /sys/class/sound/card$i/id) /usr/bin/espeakup >> /var/log/espeakup.log 2>&1 while ! [ -r /var/run/espeakup.pid ]
                                        do
                                                sleep 0.1
                                        done
                                        pid=$(cat /var/run/espeakup.pid)
                                        answer=none
echo Please type enter to use this sound board
                                        read -t 5 answer
                                        kill $pid
                                        while [ -r /var/run/espeakup.pid ]
                                        do
                                                sleep 0.1
                                        done
                                        if [ "$answer" != none ]
                                        then
                                                CARD=$i
                                                break
                                        fi
                                done
                        done
                        echo "$CARD" > /var/run/espeakup.card
ALSA_CARD=$(cat /sys/class/sound/card$CARD/id) /usr/bin/espeakup >> /var/log/espeakup.log 2>&1
        esac
fi

Hope this helps a bit more.



reply via email to

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