emotion='neutral' #'Default is neutral. Also supported are good (friendly) and evil (angry)'
speaker='ermil' # (Optional): Speaker voice. Default is zahar. Supported female voices are jane, oksana, alyss, omazh and male voices are zahar and ermil.
-v, -version, --version Посмотреть версию программы.
-i, -input, --input Входной текстовый файл.
-o, -output, --output Выходной файл звуковой.
-e, -emotion, --emotion Эмоциональный настрой говорящего. Может принимать значения "neutral", "good", "evil". По умолчанию "$emotion".
-s, -speaker, --speaker Голос говорящего. Может принимать значения "oksana","jane","omazh","zahar","ermil","silaerkan","erkanyavas","alyss", "nick". По умолчанию "$speaker".
-S, -speed, --speed Скорость озвучки. По умолчанию "$speed".
-O, -ffmpeg_opt, --ffmpeg_opt Дополнительные параметры ffmpeg.
-f, -format, --format Выходной формат. Может быть либо "mp3", либо "wav". По умолчанию "$format".
-q, -quality, --quality Качество выходного файла. Может быть либо "hi", либо "lo". По умолчанию "$quality".
-l, -lang, --lang Язык озвучки. По умолчанию "$lang".
-V, -verbose, --verbose Подробный вывод.
EOF
}
# $@ is all command line parameters passed to the script.
# -o is for short options like -v
# -l is for long options with double dash like --version
# the comma separates different long options
# -a is for long options with single dash like -version
# Example
# 'h' is a no-value option.
# 'v:' implies that option -v has value and is a mandatory option. ':' means has a value.
# 't::' implies that option -t has value but is optional. '::' means optional.
options=$(getopt --long "help,version,verbose,input:,output:,emotion:,speaker:,speed:,ffmpeg_opt:,format:,quality:,lang:" -o "hvVi:o:e:s:S:O:f:q:l:" -a -- "$@")
# set --:
# If no arguments follow this option, then the positional parameters are unset. Otherwise, the positional parameters
# are set to the arguments, even if some of them begin with a ‘-’.