text-to-Speech (TTS) lithuanian language (lt) error
The problem
Lithuanian language “Talk” feature is enabled in Google Translate (https://translate.google.com/intl/en_ALL/about/languages/), but when i try to use language "lt" in tts platform, getting error "Error running action. Not supported language lt"
What version of Home Assistant Core has the issue?
2023.02
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Text-to-Speech (TTS)
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tts
Diagnostics information
No response
Example YAML snippet
service: tts.google_translate_say
data:
entity_id: media_player.google_home
message: Labas
language: lt
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @pvizeli, mind taking a look at this issue as it has been labeled with an integration (tts) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of tts can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleChange the title of the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign ttsRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
tts documentation tts source (message by IssueLinks)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
the problem is not solved
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
the problem is not solved
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
the problem is not solved
the problem is not solved
still not working?
Not working :(
Hi. Sadly, Lithuanian still not working... Latvian working, but Lithuanian no. :( One year.
Hi there! I`m also headbanging at this... Subscribing.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still not resolved. :(
2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] text: Laba Diena
2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] tld: lt
2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] lang: lt
2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] slow: False
2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.tts] lang_check: True
2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.tts] pre_processor_funcs: [<function tone_marks at 0x7f7420c860>, <function end_of_line at 0x7f7420efc0>, <function abbreviations at 0x7f72f0d760>, <function word_sub at 0x7f72f0d8a0>]
2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.tts] tokenizer_func: <bound method Tokenizer.run of re.compile('(?<=\\?).|(?<=!).|(?<=?).|(?<=!).|(?<!\\.[a-z])\\. |(?<!\\.[a-z]), |(?<!\\d):|\\[|¡|\\)|‥|—|\\(|,|;|\\\n|\\]|…|¿|:|،|、|。', re.IGNORECASE) from: [<function tone_marks at 0x7f72f0d4e0>, <function period_comma at 0x7f72f0c720>, <function colon at 0x7f72f0c400>, <function other_punctuation at 0x7f72f0d9e0>]>
2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.lang] langs: {'af': 'Afrikaans', 'ar': 'Arabic', 'bg': 'Bulgarian', 'bn': 'Bengali', 'bs': 'Bosnian', 'ca': 'Catalan', 'cs': 'Czech', 'cy': 'Welsh', 'da': 'Danish', 'de': 'German', 'el': 'Greek', 'en': 'English', 'eo': 'Esperanto', 'es': 'Spanish', 'et': 'Estonian', 'fi': 'Finnish', 'fr': 'French', 'gu': 'Gujarati', 'hi': 'Hindi', 'hr': 'Croatian', 'hu': 'Hungarian', 'hy': 'Armenian', 'id': 'Indonesian', 'is': 'Icelandic', 'it': 'Italian', 'iw': 'Hebrew', 'ja': 'Japanese', 'jw': 'Javanese', 'km': 'Khmer', 'kn': 'Kannada', 'ko': 'Korean', 'la': 'Latin', 'lv': 'Latvian', 'mk': 'Macedonian', 'ms': 'Malay', 'ml': 'Malayalam', 'mr': 'Marathi', 'my': 'Myanmar (Burmese)', 'ne': 'Nepali', 'nl': 'Dutch', 'no': 'Norwegian', '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', 'zh-TW': 'Chinese (Mandarin/Taiwan)', 'zh': 'Chinese (Mandarin)'}
This is the logs when debug logging is enabled. Looks like lt is missing from langs dictionary.
After more investigations, I've found that Home Assistant uses gTTS python library, which sadly has no support for LT language yet. So this langs dictionary is the internal gTTS library dictionary and not the one from Home Assistant.
I think this issue could be solved very easily and very quickly:
Home Assistant could just set lang_check=False here, during gTTS instance creation (lang_check arg is True by default, if not set). This would not check gTTS internal supported language set and would try to execute the tts request. I would say that this is the preferable approach, especially knowing that in the worst case scenario the request would just fail, and in the best case- more languages would be supported out of the box.
@pvizeli Could someone look into this? The fix should be very trivial IMO.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still not working... Please, fix it... it's very useful and necessary functionality.
Any news on this issue?
Google cloud arba microsoft tts :)
Google cloud arba microsoft tts :)
Sorry for piggy-backing on this issue, however I don't see any other way to contact andriukas. You keep using some crappy automatic translator to translate HA into Lithuanian. Please read what you are translating. Music "player" gets translated into "gamer" for Lithuanian translation (as it's done without any context), and your machine translator adds a bunch of spaces, after each new line or in between quotes. There are a bunch of other mistranslations that have to be periodically fixed after you submit it to the lokalise service.
Andiukas... it's not completed.
Andiukas... it's not completed.
Nothing solves the problem, but there are other alternatives
Anyway... keep it open.
2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] text: Laba Diena 2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] tld: lt 2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] lang: lt 2024-07-16 21:42:10.267 DEBUG (SyncWorker_37) [gtts.tts] slow: False 2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.tts] lang_check: True 2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.tts] pre_processor_funcs: [<function tone_marks at 0x7f7420c860>, <function end_of_line at 0x7f7420efc0>, <function abbreviations at 0x7f72f0d760>, <function word_sub at 0x7f72f0d8a0>] 2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.tts] tokenizer_func: <bound method Tokenizer.run of re.compile('(?<=\\?).|(?<=!).|(?<=?).|(?<=!).|(?<!\\.[a-z])\\. |(?<!\\.[a-z]), |(?<!\\d):|\\[|¡|\\)|‥|—|\\(|,|;|\\\n|\\]|…|¿|:|،|、|。', re.IGNORECASE) from: [<function tone_marks at 0x7f72f0d4e0>, <function period_comma at 0x7f72f0c720>, <function colon at 0x7f72f0c400>, <function other_punctuation at 0x7f72f0d9e0>]> 2024-07-16 21:42:10.268 DEBUG (SyncWorker_37) [gtts.lang] langs: {'af': 'Afrikaans', 'ar': 'Arabic', 'bg': 'Bulgarian', 'bn': 'Bengali', 'bs': 'Bosnian', 'ca': 'Catalan', 'cs': 'Czech', 'cy': 'Welsh', 'da': 'Danish', 'de': 'German', 'el': 'Greek', 'en': 'English', 'eo': 'Esperanto', 'es': 'Spanish', 'et': 'Estonian', 'fi': 'Finnish', 'fr': 'French', 'gu': 'Gujarati', 'hi': 'Hindi', 'hr': 'Croatian', 'hu': 'Hungarian', 'hy': 'Armenian', 'id': 'Indonesian', 'is': 'Icelandic', 'it': 'Italian', 'iw': 'Hebrew', 'ja': 'Japanese', 'jw': 'Javanese', 'km': 'Khmer', 'kn': 'Kannada', 'ko': 'Korean', 'la': 'Latin', 'lv': 'Latvian', 'mk': 'Macedonian', 'ms': 'Malay', 'ml': 'Malayalam', 'mr': 'Marathi', 'my': 'Myanmar (Burmese)', 'ne': 'Nepali', 'nl': 'Dutch', 'no': 'Norwegian', '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', 'zh-TW': 'Chinese (Mandarin/Taiwan)', 'zh': 'Chinese (Mandarin)'}This is the logs when debug logging is enabled. Looks like
ltis missing fromlangsdictionary. After more investigations, I've found that Home Assistant uses gTTS python library, which sadly has no support for LT language yet. So thislangsdictionary is the internalgTTSlibrary dictionary and not the one from Home Assistant.I think this issue could be solved very easily and very quickly: Home Assistant could just set
lang_check=Falsehere, during gTTS instance creation (lang_checkarg is True by default, if not set). This would not check gTTS internal supported language set and would try to execute the tts request. I would say that this is the preferable approach, especially knowing that in the worst case scenario the request would just fail, and in the best case- more languages would be supported out of the box.@pvizeli Could someone look into this? The fix should be very trivial IMO.
Hi, I see that the Lithuanian language has been added on 2024 07 20 https://github.com/pndurette/gTTS/blob/main/gtts/langs.py, but the integration is still broken.
Works :)
No... not working. The same error: Error on load tts: 1b9efa821ee796812ea1f68ccd6f3d2d359ceb58_lt_-_google_translate not in cache!
No... not working. The same error: Error on load tts: 1b9efa821ee796812ea1f68ccd6f3d2d359ceb58_lt_-_google_translate not in cache!
Working for me ;) no error ;) Maybe: https://github.com/home-assistant/core/issues/111909
HA Version? Automation YAML?
Och.... February, 2025 release. I will wait few days for official release and will test it. Thanks.
Yeah, this should be fixed in 2025.2 release.