Barry, i couldnt resist and made some changes 
Also, after some tries, figured, i cannot differ signs (.-) from chars (a-z) or words, without the use of some delaying sleep calls...
time morse -l "Play it again barry." | while read line; do morse-snd "$line";done
You now hear: .--.;.-..;.-;-.--;SP
You now hear: ..;-;SP
You now hear: .-;--.;.-;..;-.;SP
You now hear: -...;.-;.-.;.-.;-.--;STOP
You now hear: SP
You now hear: EOT
real 0m33.488s
user 0m0.220s
sys 0m0.315s
+ ~ $ morse "Play it again barry."
.--.;.-..;.-;-.--;SP..;-;SP.-;--.;.-;..;-.;SP-...;.-;.-.;.-.;-.--;STOPSPEOT
+ ~ $ morse-snd ".--.;.-..;.-;-.--;SP..;-;SP.-;--.;.-;..;-.;SP-...;.-;.-.;.-.;-.--;STOPSPEOT"
You now hear: .--.;.-..;.-;-.--;SP..;-;SP.-;--.;.-;..;-.;SP-...;.-;.-.;.-.;-.--;STOPSPEOT
+ ~ $
[/CODE]
#!/bin/bash
# Working idea, Barry walker, G0LCU...
# Modified by Simon Arjuna Erat, sea
# Morse.sh --> morse-sox aka morse-snd
# Sounder for Morse at about 8 WPM...
# Output can be used to modulate an SSB HF transceiver...
# OSX 10.7.5, default bash terminal AND SOX.
# Just as easily do cat /tmp/sample.raw > /dev/dsp for machines with /dev/dsp.
WAIT_SIGN=0.05
WAIT_CHAR=0.5
WAIT_WORD=1.5
WAIT_SPACE=2
SOX=$(which sox||locate sox)
if [[ ! -f /tmp/dit.raw ]]
then data="\\x80\\x26\\x00\\x26\\x7F\\xD9\\xFF\\xD9"
sample=0
# Create files & permission
for F in dit dah;do
> /tmp/$F.raw
chmod 644 /tmp/$F.raw
done
# Increase data string
for sample in {0..6} ; do data=$data$data ;done
# Do not touch Barrys creations
printf "$data" >> /tmp/dit.raw
printf "$data" >> /tmp/dah.raw
printf "$data" >> /tmp/dah.raw
printf "$data" >> /tmp/dah.raw
fi
play_dot(){ $SOX -r 8000 -b 8 -c 1 -e unsigned-integer /tmp/dit.raw -d > /dev/null 2>&1 ; }
play_dash(){ $SOX -r 8000 -b 8 -c 1 -e unsigned-integer /tmp/dah.raw -d > /dev/null 2>&1 ; }
for input in $@;do
printf "You now hear: " #$input"
case "${input:2}" in
"SP") printf "SP"
sleep $WAIT_SPACE ;;
"ST") printf "STOP"
sleep $WAIT_WORD ;;
*) for (( i = 0; $i < "${#input}"; i = $i +1 ))
do printf "${input:$i:1}"
case "${input:$i:1}" in
"-") play_dash ;;
".") play_dot ;;
";") sleep $WAIT_CHAR ;;
esac
sleep $WAIT_SIGN
done
;;
esac
printf "\nNew word..."
sleep $WAIT_WORD
printf "\r \r"
done
Hope you like it 