实时语音报警
scvoice 运行外部脚本,如 festival 或 espeak。 可能的三种调用:
同一时刻,scvoice 在每种调用类型上只能运行一个脚本。
下面脚本用作事件脚本,需要 festival:
#!/bin/sh
if [ "$2" = "1" ]; then
echo " $1" | sed 's/,/, ,/g' | festival --tts;
else
echo "Event updated, $1" | sed 's/,/, ,/g' | festival --tts;
fi
存入~/.seiscomp3/event.sh
并添加至~/.seiscomp3/scvoice.cfg
:
scripts.event = /home/sysop/.seiscomp3/event.sh
振幅脚本:
#!/bin/sh
# Play a wav file with a particular volume
# derived from the amplitude itself.
playwave ~/.seiscomp3/beep.wav -v $3
存入~/.seiscomp3/amplitude.sh
并添加至~/.seiscomp3/scvoice.cfg
:
scripts.amplitude = /home/sysop/.seiscomp3/amplitude.sh
报警脚本:
#!/bin/sh
playwave /home/sysop/.seiscomp3/siren.wav
存入~/.seiscomp3/alert.sh
并添加至~/.seiscomp3/scvoice.cfg
:
scripts.alert = /home/sysop/.seiscomp3/alert.sh
etc/defaults/global.cfg
etc/defaults/scvoice.cfg
etc/global.cfg
etc/scvoice.cfg
~/.seiscomp3/global.cfg
~/.seiscomp3/scvoice.cfg