4 SCRIPTNAME
=termux-tts-speak
6 echo "Usage: $SCRIPTNAME [OPTIONS] <text-to-speak>"
7 echo "Speak stdin input with a system text-to-speech (TTS) engine."
9 echo " -e <engine> TTS engine to use (see 'termux-tts-engines')"
10 echo " -l <language> language to speak in (may be unsupported by the engine)"
11 echo " -p <pitch> pitch to use in speech. 1.0 is the normal pitch,"
12 echo " lower values lower the tone of the synthesized voice,"
13 echo " greater values increase it."
14 echo " -r <rate> speech rate to use. 1.0 is the normal speech rate,"
15 echo " lower values slow down the speech (0.5 is half the normal speech rate),"
16 echo " greater values accelerate it ({@code 2.0} is twice the normal speech rate)."
18 echo "The text to send can be specified either as arguments or on stdin if no arguments are given."
24 while getopts :he
:l
:p
:r
: option
28 e
) PARAMS
="$PARAMS --es engine $OPTARG";;
29 l
) PARAMS
="$PARAMS --es language $OPTARG";;
30 p
) PARAMS
="$PARAMS --ef pitch $OPTARG";;
31 r
) PARAMS
="$PARAMS --ef rate $OPTARG";;
32 ?
) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
37 CMD
="@TERMUX_API@ TextToSpeech $PARAMS"