aboutsummaryrefslogtreecommitdiff
path: root/tts.sh
blob: 5d9394a1d49423235da28bc25ed36f432643af5b (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

grep --line-buffered -F "[CHATTTS]"|grep --line-buffered -F "<"|while read line
do
	pitch=$(echo "$line"|awk -F"[<>]" '{print $2}'| sha256sum | grep -Eo "[[:digit:]]{2}"  | head -n1)
	msg=$(echo "$line"|sed 's/^[^>]*>//')
	echo "$msg"|espeak -p $pitch
done