mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
313997cf64
commit
0732419c33
|
@ -324,15 +324,16 @@ def _speakerPicospeaker(pitch: int, rate: int, systemLanguage: str,
|
||||||
"""TTS using picospeaker
|
"""TTS using picospeaker
|
||||||
"""
|
"""
|
||||||
speakerLang = 'en-GB'
|
speakerLang = 'en-GB'
|
||||||
if systemLanguage:
|
supportedLanguages = {
|
||||||
if systemLanguage.startswith('fr'):
|
"fr": "fr-FR",
|
||||||
speakerLang = 'fr-FR'
|
"es": "es-ES",
|
||||||
elif systemLanguage.startswith('es'):
|
"de": "de-DE",
|
||||||
speakerLang = 'es-ES'
|
"it": "it-IT"
|
||||||
elif systemLanguage.startswith('de'):
|
}
|
||||||
speakerLang = 'de-DE'
|
for lang, speakerStr in supportedLanguages.items():
|
||||||
elif systemLanguage.startswith('it'):
|
if systemLanguage.startswith(lang):
|
||||||
speakerLang = 'it-IT'
|
speakerLang = speakerStr
|
||||||
|
break
|
||||||
sayText = str(sayText).replace('"', "'")
|
sayText = str(sayText).replace('"', "'")
|
||||||
speakerCmd = 'picospeaker ' + \
|
speakerCmd = 'picospeaker ' + \
|
||||||
'-l ' + speakerLang + \
|
'-l ' + speakerLang + \
|
||||||
|
|
Loading…
Reference in New Issue