deblockt / google-home-push Goto Github PK
View Code? Open in Web Editor NEWpython lib to push message on google case device
License: MIT License
python lib to push message on google case device
License: MIT License
I have been runnig the same script for 6 months
When I run the script I am getting
looks like gtts and gtts-token have changed the api
WARNING:googlehomepush.googletts:Unable to get language list: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "./ChecksAlert.py", line 14, in
GoogleHome(host='10.0.0.1').say(text, lang='en-GB') #the google nest
File "/usr/local/lib/python3.7/dist-packages/googlehomepush/init.py", line 35, in say
ttsurl = self.ttsbuilder(text, lang)
File "/usr/local/lib/python3.7/dist-packages/googlehomepush/googletts.py", line 141, in googleTTS_builder
return GoogleTTS(text=text, lang=lang, slow=False).url()
File "/usr/local/lib/python3.7/dist-packages/googlehomepush/googletts.py", line 87, in url
part_tk = self.token.calculate_token(self.text)
File "/usr/local/lib/python3.7/dist-packages/gtts_token/gtts_token.py", line 28, in calculate_token
seed = self._get_token_key()
File "/usr/local/lib/python3.7/dist-packages/gtts_token/gtts_token.py", line 59, in _get_token_key
"Unable to find token seed! Did https://translate.google.com change?"
ValueError: Unable to find token seed! Did https://translate.google.com change?
Hello,
Thank you very much for this lib.
There is a small issue with the local server in the way it delivers TTS files created with googlecloudTTS_builder
It can return 127.0.0.1 and not the LAN adress.
One way to do it could be to use this solution from stackoverflow:
https://stackoverflow.com/questions/166506/finding-local-ip-addresses-using-pythons-stdlib/28950776#28950776
Anyway, thank you very much for the great work.
When I use the example and change to my device name in Google home
from googlehomepush import GoogleHome
GoogleHome("Google-Nest").say("test")
GoogleHome("Google-Nest").play("http://www.hubharp.com/web_sound/BachGavotteShort.mp3")
When I run the python script in vscode I get the following error.
Failed to connect, retrying in 5.0s
Any help would be appreciated
I haven't had a chance to test other features of this library, but "say" seems to no longer work. I believe it may be due to the API changes around gTTS. It seems like gTTS-token is now deprecated and the functionality is no longer necessary.
https://github.com/Boudewijn26/gTTS-token/blob/master/docs/november-2020-translate-changes.md
This suggests that libraries that are using this need to be updated to follow the new method.
Hello,
So if im right I just need to do the instal " pip install googlehomepush" on my raspberry pi.
I need to make sure the Raspberry is connect to my local network and my google home mini is also.
And then it will work?
i don't understand where I need to fill in the code you are explaining in the api of you're readme. Can you please help me a bit on the way.
I would like that mij google home mini is speaking a text im sending true my raspberry python project.
Thank you already for your time and effort to help me
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.