Debian Buster installer and speech issues
Didier Spaier
didier at slint.fr
Wed Apr 24 06:20:08 EDT 2019
On 23/04/2019 23:40, Didier Spaier wrote:
> On bare metal, no luck: the installer could not detect
> my sound card, so no speech in the installer.
>
> It made 9 unsuccessful attempts, told it would tried
> other cards, seemed to gave up.
>
> I have only one sound card.
>
> That's weird as I have no issue with Slint's installer,
> also using espeakup.
My assumption is that' there is an issue with S38espeakup.
If I understand well, you modified it to wait that
/sys/class/sound/card*/id be populated.
I thought, maybe there's an issue with this modification.
However, I have no issue with only one sound card in qemu
(option -soundhw hda): I get a speaking dialog to choose
the language, as expected. So, no clue, sorry.
Best,
Didier
PS FYI I attach the script used for card detection in the
current Slint installer. Obviously it is a modification of
S38espeakup (but a former version).
-------------- next part --------------
BASE=/sys/class/sound
if [ ! -d /sys/class/sound ]; then
touch /tmp/noespeakup
exit
fi
strip () {
cardid=${1#$BASE/card}
echo ${cardid%/id}
}
if ! grep -q speakup /proc/cmdline; then
# Give drivers some time to detect boards :/
sleep 2
IDS=$(echo $BASE/card*/id)
N=$(echo $IDS | wc -w)
case $N in
0)
touch /tmp/noespeakup
exit
;;
1)
# Just one card, can not be wrong
/usr/bin/espeakup -V $(cat /tmp/speech) > /tmp/espeakup.log 2>&1
echo "/usr/bin/espeakup -V $(cat /tmp/speech)" >> /tmp/report
;;
*)
# Several cards, make the user choose
CARD=none
while [ "$CARD" = none ]; do
for ID in $IDS; do
i=$(strip $ID)
ALSA_CARD=$(cat /sys/class/sound/card$i/id)
ALSA_CARD=$ALSA_CARD /usr/bin/espeakup -V $(cat /tmp/speech) >> /tmp/espeakup.log 2>&1
echo "ALSA_CARD=$ALSA_CARD /usr/bin/espeakup -V $(cat /tmp/speech)" >> /tmp/report
echo $ALSA_CARD >/tmp/alsacard
echo "defaults.pcm.card $i" >/tmp/asound.conf
echo "defaults.ctl.card $i" >>/tmp/asound.conf
answer=none
echo "Please type enter to use the sound board $ALSA_CARD"
echo
read -t 7 dummy
answer=$?
if [ $answer -eq 0 ]; then
CARD=$i
echo "Card chosen: $i" >> /tmp/cards
break
fi
PID=$(ps -C espeakup --noheaders -o pid)
kill -s 9 $PID
sleep 1
done
if [ "$CARD" = none ]; then
echo "No card was selected. Speech will not be provided."
touch /tmp/noespeakup
rm /tmp/alsacard
rm /tmp/asound.conf
echo "No sound card selected" >> /tmp/report
exit
fi
done
esac
fi
More information about the Speakup
mailing list