[macosx-unix] voice synth

Bob Ippolito bob at redivi.com
Wed Mar 7 21:09:09 EST 2007


On 3/7/07, George Georgalis <george at galis.org> wrote:
> There is a lecture in html I'd like to have read to me with the
> voice synthesizer in the mac.  How can I get it to do that?
>
> BTW, here is how I get the words to move when I'm too lazy to use
> the scroll keys (program expects text on stdin, prints a byte
> count at each paragraph and offers a crude way to start from the
> middle, you'll have to fix the ^M ctrl characters...)
>
> count=$1
> dd bs=1 count=$count 2>/dev/null
>
> while :; do
>         count=$((count + 1 ))
>         c=$(dd bs=1 count=1 2>/dev/null | tr '\n' '^M' )
>         case $c in
>          ' ') sleep 0.09 ;;
>          '^M') sleep 0.7 ; echo ; [ "$c" = "$c2" ] && echo "(($count))" && echo && c='' ;;
>             *) sleep 0.05 ;;
>         esac
>         printf "$c"
>         c2=$c
> done
>
>
> adjust delay to suit.

man 1 say

-bob


More information about the macosx-unix mailing list