Closed Mohammed-Shoaib closed 3 years ago
Please forgive my ignorance. I am getting this error when using the below card:
entity: media_player.living_room_speaker
hold_action:
action: none
show_icon: true
show_name: true
tap_action:
action: call-service
service: tts.google_translate_say
service_data:
entity_id: media_player.living_room_speaker
message: Please remember to close the back door!
type: entity-button
However, I am still able to make the same device talk successfully by using below:
Call Service: tts.google_translate_say
entity_id: media_player.living_room_speaker
message: Please remember to close the back door!
I'm curious why does one work, but not the other? They are both making my Google Nest speak. Will I be able to use the card that's failing now in an upcoming Home Assistant version without changing anything in my configuration?
Just closing this, as it was kept for discussion after the issue was fixed and then bit of an HA direction talk but it's starting to derail a bit.
So cool to see this go to HA, thanks for your work all. I'll sure try to contribute when I can!
Has the Error been fixed? Should I just upgrade gTTS ans gTTS-token?
Has the Error been fixed? Should I just upgrade gTTS ans gTTS-token?
Upgrading the versions worked for me.
Uninstall and Reinstall of gTTS worked For me.
Happening with me also, using Python 3.9 on Windows 10. Used this library before and not issues, check the code here: https://github.com/afonsosantos/alexis/blob/master/main.py
The error:
Traceback (most recent call last): File "C:\Users\afons\Desktop\pyvoice\pyVoice\main.py", line 25, in <module> respond(voice_data) File "C:\Users\afons\Desktop\pyvoice\pyVoice\main.py", line 9, in respond date() File "C:\Users\afons\Desktop\pyvoice\pyVoice\commands\date_time.py", line 9, in date speak('A data de hoje é ' + str(today_date)) File "C:\Users\afons\Desktop\pyvoice\pyVoice\utils\audio.py", line 51, in speak tts.save(audio_file) File "C:\Users\afons\Desktop\pyvoice\pyVoice\venv\lib\site-packages\gtts\tts.py", line 295, in save self.write_to_fp(f) File "C:\Users\afons\Desktop\pyvoice\pyVoice\venv\lib\site-packages\gtts\tts.py", line 251, in write_to_fp prepared_requests = self._prepare_requests() File "C:\Users\afons\Desktop\pyvoice\pyVoice\venv\lib\site-packages\gtts\tts.py", line 194, in _prepare_requests part_tk = self.token.calculate_token(part) File "C:\Users\afons\Desktop\pyvoice\pyVoice\venv\lib\site-packages\gtts_token\gtts_token.py", line 28, in calculate_token seed = self._get_token_key() File "C:\Users\afons\Desktop\pyvoice\pyVoice\venv\lib\site-packages\gtts_token\gtts_token.py", line 58, in _get_token_key raise ValueError( ValueError: Unable to find token seed! Did https://translate.google.com change?
EDIT: after some analysis, seems to be crashing on the
tts.save
line as below:
bro the same is happening with me tooo I guess there is a server problem from gtts site
tried uninstalling and installing but still the same error.
Uninstall and Reinstalling it Helped Me
After I send 10-15 requests, I get the following error:
I thought this might be a bug in the latest release, i.e., 2.1.1 so I tried 1.2.0 and I still get the same error.
I also thought it could be that my IP address is being blocked. I read up on the Quotas & limits and I don't think that should be an issue as well.
System information:
Thank you for your timely help. :relaxed: :sparkles: