educare:pc_parlante2
PC parlante (2.0)
Aggiornamento di pc_parlante
Per la lettura delle parole in lingua inglese, con traduzione in italiano, si può usare questo script (traduceita.sh), che sostistuisce quello spiegato in
Dipendenze
curl, festival, alsa-oss, festvox-itapc16k, festvox-kallpc16k, xsel, sed, libc-bin
NOTA:
E' stato sviluppato per XFCE, dove è necessario installare libnotify-bin
Se non è disponibile libnotify-bin, basta cancellare l'ultima riga dello script
BUG IMPORTANTE Sul sistema Debian è presente un bug per la lingua italiana La patch è segnalata, ma non è applicabile (2019)
$ echo 'miao' | festival --tts --pipe --language italian SIOD ERROR: wrong type of argument to get_c_utt
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351495
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335845
- traduceita.sh
#!/bin/bash xsel | sed 's/\\u..../ - /g' | festival --tts --pipe --language english; sleep 0.5; curl https://en.wiktionary.org/wiki/`xsel|tr '[:upper:]' '[:lower:]'` -o ${HOME}/.parlante/wiktionary.htm iconv -f UTF-8 ${HOME}/.parlante/wiktionary.htm -t ISO-8859-15 -c -o ${HOME}/.parlante/wiktionary2.htm parole=`html2text -width 30 ${HOME}/.parlante/wiktionary2.htm | grep -i '* Italian:' | sed -e 's/\(^.*Italian:\) \(\w*\).(it)\(\W*\w*\)\{\0,\}/\2/g' | head -2 ` parola=`echo ${parole} | head -1` echo ${parole} | festival --tts --pipe --language italian; notify-send -t 2500 ${parola}
educare/pc_parlante2.txt · Last modified: 2020/06/08 22:20 by 127.0.0.1