home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.79k stars 28.93k forks source link

Lithuanian language TTS not working #111909

Open Armikas opened 4 months ago

Armikas commented 4 months ago

The problem

When selecting Lithuanian language from drop down menu in "Media-browser>Text-to-speech>Google en com" (full path: media-browser/browser/app%2Cmedia-source%3A%2F%2Ftts/provider%2Cmedia-source%3A%2F%2Ftts%2Ftts.google_encom) there are no audio output. For example Latvian language works ok. Same problem in automation: ``` service: tts.speak target: entity_id: tts.google_en_com data: cache: false media_player_entity_id: media_player.lounge_speaker message: Testas language: lt


### What version of Home Assistant Core has the issue?

core-2024.2.5

### 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

Google Translate text-to-speech

### Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_translate/

### Diagnostics information

_No response_

### Example YAML snippet

```yaml
service: tts.speak
target:
  entity_id: tts.google_en_com
data:
  cache: false
  media_player_entity_id: media_player.lounge_speaker
  message: Testas
  language: lt

Anything in the logs that might be useful for us?

In debug log there is no Lithuanian among listed languages...
I asume that the problem is in "homeassistant/components/google_cloud/tts.py" file. 

2024-02-29 23:48:11.410 DEBUG (SyncWorker_55) [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)'}

Additional information

Is it possible for me to check "homeassistant/components/google_cloud/tts.py" file content to be sure that it is ok? As I see here "https://github.com/justasrutkauskas/core/blob/Google-Cloud-New-Languages/homeassistant/components/google_cloud/tts.py" Lithuanian language is present.

home-assistant[bot] commented 4 months ago

google_translate documentation google_translate source

issue-triage-workflows[bot] commented 1 month ago

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.

Armikas commented 1 month ago

Latvian and other languages works ok, but Lithuanian not. Still not resolved. :(

Armikas commented 1 month ago

Turned on debug logging for Google Translate text-to-speech integration. When playing any language I`ve tested - log is empty, no errors. But if I try to play Lithuanian (lt) language errors appear.

When selected Browser audio output:

_Logger: homeassistant.components.tts Source: components/tts/init.py:1039 integration: Text-to-speech (TTS) (documentation, issues) First occurred: 4:03:05 PM (1 occurrences) Last logged: 4:03:05 PM

Error on load tts: bb613edb6505739a2234d697c522685505b91b99lt-_tts.google_encom not in cache!

And when selected Lounge speaker (Google nest mini) output, appears two errors:

_Logger: homeassistant.components.tts Source: components/tts/init.py:1039 integration: Text-to-speech (TTS) (documentation, issues) First occurred: 4:06:20 PM (1 occurrences) Last logged: 4:06:20 PM

Error on load tts: dbbc260fa65a4ac188157bc8892dc803d4bd9d3alt-_tts.google_encom not in cache!

and

_Logger: homeassistant.components.cast.media_player Source: components/cast/media_player.py:411 integration: Google Cast (documentation, issues) First occurred: 4:06:21 PM (1 occurrences) Last logged: 4:06:21 PM

Failed to cast media http://192.168.1.202:8123/api/tts_proxy/dbbc260fa65a4ac188157bc8892dc803d4bd9d3a_lt_-_tts.google_en_com.mp3 from internalurl (http://192.168.1.202:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Looks like something wrong with audio file generation. File "dbbc260fa65a4ac188157bc8892dc803d4bd9d3alt-_tts.google_en_com.mp3" not appear in tts folder.

It would be nice if someone have tested Lithuanian language.

Armikas commented 1 week ago

Just tested on frieds Home Assistent, the same situation - Lithuanian language not work. download