User Tools

Site Tools


educare:pc_parlante2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
educare:pc_parlante2 [2018/08/04 11:39] profproeducare:pc_parlante2 [2020/06/08 22:20] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====PC parlante (2.0)====
 +
 +Aggiornamento di [[educare: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 
 +
 +[[educare:pc_parlante]]
 +
 +==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
 +
 +
 +<code file 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}
 +</code>
 +