edge-tts seem more advance than this, but who knows how long it will continue to work. https://github.com/pndurette/gTTS
it doesn't support different voices, just different languages; don't know if worth it or possible; seems to produce mp3s
gtts-cli --all
af: Afrikaans
am: Amharic
ar: Arabic
bg: Bulgarian
bn: Bengali
bs: Bosnian
ca: Catalan
cs: Czech
cy: Welsh
da: Danish
de: German
el: Greek
en: English
es: Spanish
et: Estonian
eu: Basque
fi: Finnish
fr: French
gl: Galician
gu: Gujarati
ha: Hausa
hi: Hindi
hr: Croatian
hu: Hungarian
id: Indonesian
is: Icelandic
it: Italian
iw: Hebrew
ja: Japanese
jw: Javanese
km: Khmer
kn: Kannada
ko: Korean
la: Latin
lt: Lithuanian
lv: Latvian
ml: Malayalam
mr: Marathi
ms: Malay
my: Myanmar (Burmese)
ne: Nepali
nl: Dutch
no: Norwegian
pa: Punjabi
pl: Polish
pt: Portuguese
ro: Romanian
ru: Russian
si: Sinhala
sk: Slovak
sq: Albanian
sr: Serbian
su: Sundanese
sv: Swedish
sw: Swahili
ta: Tamil
te: Telugu
th: Thai
tl: Filipino
tr: Turkish
uk: Ukrainian
ur: Urdu
vi: Vietnamese
zh-CN: Chinese (Simplified)
zh-TW: Chinese (Mandarin/Taiwan)
zh: Chinese (Mandarin)
Examples:
echo "Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich" | gtts-cli -l de -f - | mpv -echo "The five boxing wizards jump quickly." | gtts-cli -l en -f - | mpv -echo "Portez ce vieux whisky au juge blond qui fume" | gtts-cli -l fr -f - | mpv -
Interesting, I was was not familiar with this. I probably won't have spare time to add this for a while but I'll keep this open to remind me to do it one of these days.
edge-tts seem more advance than this, but who knows how long it will continue to work. https://github.com/pndurette/gTTS it doesn't support different voices, just different languages; don't know if worth it or possible; seems to produce mp3s
Examples:
echo "Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich" | gtts-cli -l de -f - | mpv -
echo "The five boxing wizards jump quickly." | gtts-cli -l en -f - | mpv -
echo "Portez ce vieux whisky au juge blond qui fume" | gtts-cli -l fr -f - | mpv -