core: Lithuanian language TTS not working
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_en_com) 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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 18
Happy to have helped. If it ever gets fixed directly in Home Assistant you can just delete the google_translate folder in custom_components, restart Home Assistant and it will use the official version again.
Louis, you are awesome! It’s working, now it speeks Lithuanian! You made my day! Billion thanks! Oh, I’m going crazy, I’m so happy! One more thanks for detailed instructions!
Sure, So on your home assistant VM/pi/computer there should be a folder custom_components (https://community.home-assistant.io/t/custom-component-where-is-the-folder/67027). I use HAOS in a VM, so for me it was at /homeassistant/custom_components
Inside this, make a folder google_translate. You then need to download the 6 files from here https://github.com/home-assistant/core/tree/dev/homeassistant/components/google_translate into that folder. Can either copy and paste the text one by one, use wget/curl directly from github or winscp/filezilla from your desktop after downloading there. Whatever you’re comfortable with.
Once you have all the files, you need to edit manifest.json (could also update before copying over if that’s easier):
Like so:
You need to add the version for home assistant to load a custom component. Be sure to add the comma after requirements when adding this new version variable
Restart home assistant It should now have loaded in place of the bundled component and Lithuanian voice should work from Google TTS
Seems the gtts library used just needs updating to v2.5.2 and testing with HA as the library only added lithuanian in that release: https://github.com/pndurette/gTTS/releases/tag/v2.5.2
Issue still present. lt language doesn’t work (lv and all other tested works fine)
Core 2024.8.1 Supervisor 2024.08.0 Operating System 13.0 Frontend 20240809.0
Bump.Having same issues. All other languages just work.