Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Italian language with Google TTS #2534

Closed
luca-vercelli opened this issue Apr 13, 2020 · 0 comments · Fixed by #2535
Closed

Italian language with Google TTS #2534

luca-vercelli opened this issue Apr 13, 2020 · 0 comments · Fixed by #2535

Comments

@luca-vercelli
Copy link
Contributor

I'm running Mycroft on Manjaro Linux, with Italian language.
I tried both the "British male" and "American male" voices, and they do not speak Italian at all. So I decided to try the Google Voice.
That way, no sound is emitted. Whenever Mycroft tries to speak, I see this error in logs (file audio.log):

2020-04-13 10:45:39.632 | INFO     | 195922 | mycroft.audio.speech:mute_and_speak:127 | Speak: Va uno spettacolo
2020-04-13 10:45:40.070 | ERROR    | 195922 | mycroft.audio.speech:handle_speak:99 | Error in mute_and_speak
Traceback (most recent call last):
  File "/home/luke/git/mycroft-core/mycroft/audio/speech.py", line 95, in handle_speak
    mute_and_speak(chunk, ident, listen)
  File "/home/luke/git/mycroft-core/mycroft/audio/speech.py", line 129, in mute_and_speak
    tts.execute(utterance, ident, listen)
  File "/home/luke/git/mycroft-core/mycroft/tts/tts.py", line 337, in execute
    wav_file, phonemes = self.get_tts(sentence, wav_file)
  File "/home/luke/git/mycroft-core/mycroft/tts/google_tts.py", line 35, in get_tts
    tts = gTTS(text=sentence, lang=self.lang)
  File "/home/luke/git/mycroft-core/.venv/lib/python3.8/site-packages/gtts/tts.py", line 121, in __init__
    raise ValueError("Language not supported: %s" % lang)
ValueError: Language not supported: it-it

The problem is that Google TTS can handle "it", but it cannot handle "it-it".

I will release a PR shortly for fixing this. (So far, Google Voice seems my only option for Italian language, so I really need that).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant