pigpen redet jetzt mit mir o.o
Tuesday, October 13, 2009 4:20:43 PM
OK, schon wieder vergessen, das der Cronjob das tägliche Backup gestartet hat
Das ist es; soll er mir doch sagen, dass er gerade andere Sachen auf dem Zettel hat, und ich mich ein wenig mit meinen Anforderungen für die nächsten 10 Minuten zurückhalten soll. Da ROBO sehr einfach in kleine Skripts zu integrieren ist, war das auch in wenigen Minuten erledigt.
#!/bin/bash echo "Es ist... `date| sed -e 's#.\+\ 0\?\([1-9]\?[0-9]\):0\?\([1-9]\?[0-9]\):.\+#\1 uhr \2#g'` ...ich starte das tägliche Backup der root Partition" | /usr/local/bin/rob sudo rdiff-backup --print-statistics --exclude '/tmp/*' --exclude '/proc/*' --exclude '/sys/*' --exclude '/media/*/*' / /media/DATA/rdiff-backups/001.001.001.001/root sudo rdiff-backup --remove-older-than 14D --force /media/DATA/rdiff-backups/001.001.001.001/root echo "Es ist... `date| sed -e 's#.\+\ 0\?\([1-9]\?[0-9]\):0\?\([1-9]\?[0-9]\):.\+#\1 uhr \2#g'` ...Das Backup der root Partition ist beendet" | /usr/local/bin/rob
Man muß sich zwar daran gewöhnen, dass auf einmal ( täglich 18:00h ) aus dem OFF eine Stimme erklingt, aber nach wenigen Anläufen freut man sich über den kleinen Hinweis und geht dann zum Beispiel einen Kaffee holen !
Für eine Sprachausgabe in deutscher Sprache muss natürlich zusätzlich mbrola installiert werden. Hierfür habe ich mit der Unterstützung von LINUXNETZER ein Installationsskript für Ubuntu zusammengestellt. Das Script ist auf Ubuntu 8.10,Ubuntu 9.04 sowie auf Kubuntu 9.04 ohne Fehler durchgelaufen. Aber wie es immer so schön Heißt, die Benutzung des Skriptes ist natürlich auf eigene Gefahr und ohne jegliche Gewährleistung.
Das Installationsskript muß mit sudo ausgeführt werden.
#!/bin/sh ####################### DESCRIPTION echo "This script will install the german voices of "mbrola" on your system to work with "festival" and will allow you to use the speechrobot "robo" with german voices." echo "By default it will download ALL german voices. Default voice is voice 6." echo "If you are fine with only one default voice , please uncomment (#) all other voices in section -DOWNLOAD VOICES- and -INFLATE VOICES-" # This script was written by ROUGHTRADE and reviewed by LINUXNETZER (both of the german ubuntuusers.de community). For license and warranty see below. ####################### PREPARE INSTALLATION mkdir -p ~/mbrola/sources cd ~/mbrola/sources ####################### DOWNLOAD MBROLA wget http://ftp.de.debian.org/debian/pool/non-free/m/mbrola/mbrola_3.01h-2_i386.deb #download debian package mbrola ####################### DOWNLOAD VOICES wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de1/de1-980227.zip #download voice german 1 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de2/de2-990106.zip #download voice german 2 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de3/de3-000307.zip #download voice german 3 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de4/de4.zip #download voice german 4 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de5/de5.zip #download voice german 5 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de6/de6.zip #download voice german 6 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de7/de7.zip #download voice german 7 wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/de8/de8.zip #download voice german 8 ###################### DOWNLOAD TXT2PHO #wget http://www.ikp.uni-bonn.de/forschung/phonetik/sprachsynthese/txt2pho/txt2pho.zip #download txt2pho old path wget http://www.sk.uni-bonn.de/forschung/phonetik/sprachsynthese/txt2pho/txt2pho.zip #download txt2pho ###################### INSTALL MBROLA dpkg -i mbrola_3.01h-2_i386.deb #install debian package mbrola ###################### INSTALL FESTIVAL, SOX, RECODE apt-get install -y sox recode festival #install sox and recode and festival ###################### INFLATE VOICES unzip de1-980227.zip -d /usr/share/mbrola # unpack voice german 1 unzip de2-990106.zip -d /usr/share/mbrola # unpack voice german 2 unzip de3-000307.zip -d /usr/share/mbrola # unpack voice german 3 unzip de4.zip -d /usr/share/mbrola/de4 # unpack voice german 4 unzip de5.zip -d /usr/share/mbrola # unpack voice german 5 unzip de6.zip -d /usr/share/mbrola # unpack voice german 6 unzip de7.zip -d /usr/share/mbrola/de7 # unpack voice german 7 unzip de8.zip -d /usr/share/mbrola # unpack voice german 8 ##################### GET TXT2PHO READY unzip txt2pho.zip -d /usr/share/ # unpack txt2pho chmod 755 /usr/share/txt2pho/txt2pho # make txt2pho executable chmod 755 /usr/share/txt2pho/pipefilt/pipefilt # make pipefilt executable chmod 755 /usr/share/txt2pho/preproc/preproc # make preproc executable sed 's/home\/tpo\/txt2pho/usr\/share\/txt2pho/g' /usr/share/txt2pho/txt2phorc > /etc/txt2pho # do reg expression on txt2phorc and copy renamed to /etc/txt2pho ##################### mkdir -p ~/usr/local/bin #make directory /usr/local/bin if not exist ##################### MAKE SCRIPT /usr/local/bin/rob # make script /usr/local/bin/rob cat > /usr/local/bin/rob << "EOF" #!/bin/sh ROOT=/usr/share/txt2pho # Where are the needed files? VOICE=/usr/share/mbrola/de6/de6 # Path to the mbrola-voice SEX=m # m/f Which sex has your voice? SOUND=0.9 # sound frequency 0.5-> 1.5 in 0.1 steps is usual eval "cat $file | recode UTF-8..Latin-1 |\ sed 's/@/ ät /g' |\ $ROOT/pipefilt/pipefilt |\ $ROOT/preproc/preproc $ROOT/preproc/Rules.lst $ROOT/preproc/Hadifix.abk |\ $ROOT/txt2pho -$SEX -p $ROOT/data/ |\ mbrola -f$SOUND $VOICE - -.au |\ play -q -t au -" EOF ##################### MAKE SCRIPT /usr/local/bin/robo #make script /usr/local/bin/robo cat > /usr/local/bin/robo << "EOF" #!/bin/sh #by snoopy # if [ "$*" = "" ]; then echo "usage: robo Hello World " exit 1 else echo $* | rob echo $* fi EOF ##################### MAKE SCRIPTS EXECUTABLE chmod 755 /usr/local/bin/rob # make script rob executable chmod 755 /usr/local/bin/robo # make script robo executable ##################### SYMBOLIC LINKS FOR PATH COMPATIBILITY ln -s /usr/local/bin/robo /usr/bin/ # symbolic link to /usr/bin ##################### CLEAN UP rm -r ~/mbrola/ # delete install folder ##################### NOW LET US SPEAK A LITTLE BIT echo "Hallo, ich kann sprechen..." | rob # syntax for script rob robo Hallo $USER. Dein Computer `hostname` nutzt den folgenden Kernel..`uname -r` # syntax for script robo robo Es ist der `date +"%dste %B %G"` ..und es ist.. `date| sed -e 's#.\+\ 0\?\([1-9]\?[0-9]\):0\?\([1-9]\?[0-9]\):.\+#\1 Uhr \2#g'` #################### LICENSE # This script is released under GPL version 2 or any later version # It was written in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even any implied warranty. # See the GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA ################### CONTACT # To report any bugs please mail to: speechrobot-at-gmx.de # As this script is volunteer work, it may no longer be developed # See also: http://speechrobot.wordpress.com # Further info: http://linuxnetz.wordpress.com/?s=robo or http://my.opera.com/Roughtrade/blog/ ##################
Anmerkung: Die Installation der 6 verschiedenen deutschen Stimmen benötigt einen Speicherplatz von insgesamt 500MB. Wem das zu viel ist, der kann ohne weiteres die nicht gewünschten Stimmen aus dem Script entfernen. Im Skript ist die deutsche Stimme 6 voreingestellt. Da das Installationsskript das benötigte Skript rob automatisch erzeugt, sollte die Stimme vor der Installation geändert werden.
Demo (.wav) der verschiedenen Stimmen:
Stimme german 1 (weiblich)
Stimme german 2 (männlich)
Stimme german 3 (weiblich)
Stimme german 4 (männlich)
Stimme german 5 (weiblich)
Stimme german 6 (männlich)
Stimme german 7 (weiblich)
Stimme german 8 (männlich)
Nach einer erfolgreichen Installation können zwei neue Befehle in der Konsole benutzt werden
echo "Hallo" | rob
oder
robo Hallo
Ich hoffe Ihr habt genau soviel Spaß mit robo wie ich. Über Ideen
für neue Scripte mit robo würden LINUXNETZER und ich uns sehr freuen.






Unregistered user # Saturday, October 10, 2009 3:35:34 PM
Roughtrade # Monday, October 12, 2009 12:37:28 PM
Originally posted by anonymous:
Danke für den Tipp. Normalerweise sage ich immer "Wer Rechtschreibfehler findet, soll sie behalten" aber in diesem Fall hast du recht. Es soll natürlich "rob" heißen. Ich habe das berichtigt.