shivasiddharth / GassistPi

Google Assistant for Single Board Computers
Other
1.02k stars 304 forks source link

Feature requests #20

Open aceycv8 opened 6 years ago

aceycv8 commented 6 years ago

Hi,

Is it possible to add music streaming like in? https://www.hackster.io/vvanhee/internet-streaming-radio-with-google-aiy-1edff3

shivasiddharth commented 6 years ago

An official update of the SDK is long overdue. I am just waiting to see as to what new features that update brings. I am expecting smart home control and music streaming options to be included in the new update. if google does not update the SDK in the upcoming weeks, i shall include this feature.

ChetanaP76 commented 6 years ago

music streaming and news feature and even google assistant sdk prebuilt features like increase volume, set a timer, set an alarm.

Alex9premium commented 6 years ago

I'm kind of new to this but will it update itself or will I need start by cloning and then doing everything again or just update by using the one-line installer again

shivasiddharth commented 6 years ago

@Alex9premium , there two updates that we need to address. First update is the updation to the project that i do and second update is the updation that google does to the sdk. Unless i do a major overhaul, you can delete the folder and clone the updated project and keep using it. For google's updates, you need to run the one-line installer again.

patts75 commented 6 years ago

Any news on the neopixel connected direct to the GPIO on the PI without Audrino?

shivasiddharth commented 6 years ago

@patts75 , This update already required a good amount of work. Moreover, its just one person working on this, so Neopixel hopefully in the next update..

ChetanaP76 commented 6 years ago

Is it possible to use Custom wakeword without gRPC module

shivasiddharth commented 6 years ago

@patts75 , I was doing some testing with Neopixels. They seem to interfere with Pi's audio (because Pi's audio works on PWM) and I2S. So in all likely hood, neopixels have to be replaced with some APA102 RGB Leds..

mpskierbg commented 6 years ago

a top stories feature. I am trying to work it out on my own, but i cant seem to figure it out.

shivasiddharth commented 6 years ago

@mpskierbg , Am adding it in this update

shivasiddharth commented 6 years ago

@mpskierbg , i have added the top stories/news rss feed streaming. checkout the git or the video..https://youtu.be/WOyYL46s-q0

rarenu commented 6 years ago

Dear Mr. Sid, you may consider adding the Status report of Room temperature, Garage door opened or closed etc., by monitoring the ADC input of ESP8266 and convert that text into speech.

tkent42 commented 6 years ago

Hello Sid, I have enjoyed playing with your installs on my AIY setup. I keep up with your updates and saw on your youtube comments that you were considering a integration of Kodi control. I have implemented the IFTTT solution below but something more integrated and local to my network would be easier and probably a bit faster. Thanks for your hard work. https://github.com/OmerTu/GoogleHomeKodi

dendiee commented 6 years ago

hello sid , great work on EVERYTHING already! is very cool and usefull. i thought a feature where after a song is played using ur play functiion it plays the next one based on the current song , like youtube's "next video" feature. this can come in handy when u dont wanna keep saying song after song

shivasiddharth commented 6 years ago

@tkent42 , I have updated the project (Git) now with actions for controlling Kodi. Ref: https://youtu.be/ahc6XKYriHo

Alex9premium commented 6 years ago

Kodi series commands to play the next unwatched episode or a specific episode by saying the name of the season and episode. Thanks

Enzoinventor commented 6 years ago

Hi, I saw that you could change the text to speech in question by watching this video: https://www.youtube.com/watch? v = GMaeY_dmknA I followed all the steps but I could not make it work. it would be nice to integrate it into your project to get smoother responses compared to pico.

Enzoinventor commented 6 years ago

I managed to get a decent voice for the speech and I share with you how: Google’s Text to Speech engine is a little different to Festival and Espeak. Your text is sent to Google’s servers to generate the speech file which is then returned to your Pi and played using mplayer. This means you will need an internet connection for it to work, but the speech quality is superb.

I used used ax206geek’s bash script to access the Google Text to Speech engine (this is an updated version of that script):

Create a file speech.sh with:

nano speech.sh

the language must be set in speech.sh (tl=en)

Add these lines to the file and save it (in nano editor use CTRL-O writeOut)

!/bin/bash

say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols"http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=$*&tl=en"; } say $* Add execute permissions to your script with:

chmod u+x speech.sh Test it using:

./speech.sh Look Dave, I can see you're really upset about this.

just open the action.py file and modify for example: say (content) with subprocess.call (["./ speech.sh", content)

the code could be improved and suggestions are accepted willingly

Pancer1 commented 6 years ago

Fantastic Project!!! What TTS are You using for notification before comands execution? It sounds a little "robotic". Google TTS is more natural. Is this possible to use Google TTS?

shivasiddharth commented 6 years ago

@Pancer1 @Enzoinventor , Currently i am using pico2wave, I shall include GTTS in the next update.

Pancer1 commented 6 years ago

Great, thanks! I'm using it in coaxistance with Home Assistant and it's doing great job. One more question, how to change hot word? I was searching in main.py and actions.py but didn't find.

Pancer1 commented 6 years ago

One more request. It'll be cool if will be possible to control local alsamixer with voice (local volume up/down). It's usefull if i want control music streaming from YouTube played locally in GassistPi. Now it's only possible to controll Google Assistant and Kodi volume by voice (or i missed it).

shivasiddharth commented 6 years ago

@Pancer1 , After the SDK update, snowboy was sending the CPU usage of Pi Zero boards sky rocketing. To avoid confusions, i removed the snowboy completely. When you say volume control of music streaming, it actually means the volume control of VLC (music is played through VLC). In the next update, i will include google music streaming and in the update after, voice control of VLC (that is how i have planned).

nicusorflorin commented 6 years ago

@shivasiddharth Epic project thx alot!!!, Do you have any plan for adding autoplay to the youtube streaming feature? Also can't wait for the google music streaming feature :D

tstasevych commented 6 years ago

@shivasiddharth Thank you for great project. This makes life so much easier for non-developers who like DIY projects. I really would love to get that Google Play Music update. Any timetable on that project? Can I sign up to test it? Also, is there anyway to connect it to Google Cast SDK to allow streaming of music to different chromecast enabled speakers in home.

Again, thank you for all the time you spend helping others with Google Assistant SDK.

shivasiddharth commented 6 years ago

@nicusorflorin , In autoplay, the links are dynamically generated. Its quite some some work to implement, i can try, but cannot guarantee implementation. @tstasevych , its just one person working on this, so there is no ETA for updates. I shall let you know, once the pre-release branch is available for testing. Google Cast SDK is meant for Android platforms, for linux python, there is something called pychromecast. On two previous occasions, when i started working on the casting, google enabled the casting on the server side, so i am a bit reluctant to spend time on casting feature.

hezzzzz commented 6 years ago

i want to add led blinking when gassist responds.. and a motor start to run. should this be an action=? oder is it possible to change the main/actions/putbutton.py?

thanx

shivasiddharth commented 6 years ago

@hezzzzz , I have already made provisions for LED indicators. Please go through the README. For controlling stepper motor, you can use the function that i have already created in the actions.py file. @nicusorflorin, Managed to get autoplay working. Will release it in the next update.

hezzzzz commented 6 years ago

@shivasiddharth: LEDs: yes i know but i need the leds to be always on and just blink when gassist listens/responds..

thanx

nicusorflorin commented 6 years ago

@shivasiddharth awesome, you are the best!

shivasiddharth commented 6 years ago

@hezzzzz , Even that provision is there, I have used PWM to blink LED connected to GPIO25, which turns off at the end of conversation. Instead of turning off using led.ChangeDutyCycle(0), use led.ChangeDutyCycle(100) to always have it turned on.

shivasiddharth commented 6 years ago

@tstasevych and @nicusorflorin , Project has been updated with google music streaming and youtube autoplay features.. Update and enjoy !

Pancer1 commented 6 years ago

Google Music Streaming feature is great!

Did You have some time to think about implementing Google TTS instead of Pico?

How to change hotword? Is it possible?

shivasiddharth commented 6 years ago

Youtube autoplay will play the next video/track that comes up in youtube suggestions much like how is in the web. Got totally immersed with Google Music that I forgot about GTTS, will add it in the next update. Google has not added the wakeword customization, we have to do it by ourselves

nicusorflorin commented 6 years ago

@shivasiddharth thank will get to it once i get home, i will have to see how i can manage the update without losing my own humble customization :) (any suggestion how best to go about it? should i just merge the master branch into my local one?) (added a few extra actions)

shivasiddharth commented 6 years ago

@nicusorflorin , Use the update script that i have given at the top of README. I know that some of you might have tweaked some actions, so that script will rename/backup your existing GassistPi folder and then clone the updated git. Once all the installation and updation is done, its as easy as copying your customizations from the backedup folder to this new one.

11mail22 commented 6 years ago

missing snowboy support as offline hotword detection, as in the past. Will it come together with new SDK? Language switch support? (aiy.i18n.set_language_code)

VinceW31 commented 6 years ago

Fantastic project, many thanks for all the hard work! much better than Alexa. Can you please look at implementing multiple user profiles as now available in Google Home? This would allow my wife to fully use the device as well as me, at the moment I can access my own calendar events and personal lists, but other members of the family cant get that functionality (unless Im missing something). Cheers! and keep up the fantastic work, we all really appreciate it :-)

Pancer1 commented 6 years ago

One more idea! Maybe make a possibility to have a file whjere user could write down his own JSON requests with address to send every one of them? For example using CURL ? I'im using GassistPi with Home Assistant. Now I'm using IFTTT for integration with some other systems. It will be cool to use GassistPi intstead. IFTTT has big delay (requests are processed in the cloud). Do You know what i mean?

VinceW31 commented 6 years ago

I run my RasPi3 with modified GassistPi code controlling multiple SOnOff wireless switches and ESP8266 devices, this gives me a customisable and extendable Voice Controlled Home Automation setup. I have modified the GassistPi code so it supports multiple SOnOff wireless switches and ESP8266 using simple http requests, in this way it does not use IFTTT at all, the http requests go directly from the RasPi across my own LAN to control the wireless devices so there is no real delay. Ive also changed the way the code detects a switch request for a specific device, it no longer needs a “wireless” or a “trigger” command, it just looks for a unique device or appliance name, for example “Lamp”, “Dishwasher”, “Washing Machine”, “Lounge Lights” etc. When it detects one of the listed device/appliance names then it looks for the respective command like “On”, or “ Off” etc. This makes it much easier for the user (or wife!) as they can use a more natural phrase or string of words like from a simple “”Lamp On” or “Switch the Lamp On”, to something like “Please turn on the nice red lamp next to the setee” and they all will work ok as the initial trigger is the word “Lamp” in this example.

Pancer1 commented 6 years ago

I think this is what I need. Could you share your code? I'm not a programmer so it's hard to write something from scratch. I'll try to edit your code for my project.

Forget it! , i found it on your github. Now reading, trying to understand.

Done, works perfectly! For now with Kodi only.

shivasiddharth commented 6 years ago

@Pancer1 , Do you have a link to the IFTTT syntax/code or some examples?

Pancer1 commented 6 years ago

@shivasiddharth When You build new applet in IFTTT in "that" page:

(TO ACCESS SCRIPTS DOMAIN IN HOME ASSISTANT): URL (must be https but not sure): _https://my.domain.com/api/services/script/volume_down?api_password=MYHOMEASSISTANTPASSWORD_ METHOD: post CONTENT TYPE application/json BODY empty

(TO ACCESS OTHER SERVICES DOMAIN IN HOME ASSISTANT): URL (must be https but not sure): _https://my.domain.com/api/services/broadlink/send_packet_192_168_x_y?api_password=MYHOMEASSISTANTPASSWORD_ METHOD: post CONTENT TYPE application/json BODY { "packet" : ["JgBQAAABKZEVERQRFDYUERQRFBEUERQRFTUVNRQRFTUVNRQ2FDYUNhQRFBEUERU1FRAVERQRFBEUNhQ2FDYUERQ2FDYUNhQ2FAAFHAABKEkUAA0FAAAAAAAAAAA="] }

IFTTT is great but gives about 3 seconds delay in command execution. That's why now i want to use GassistPi for that.

Any questions?

rarenu commented 6 years ago

Dear Mr. VinceW31, great work!! This is what I have requested Mr. Sid also to include sometime back. Can you please share the changes you made, for me to try out. Thanks in advance ragoth@gmail.com

shivasiddharth commented 6 years ago

How many would like to attach a Nextion display and get a text response in addition to voice response?

With the recent Chromecast update, quite some stuff has been put in place for entertainment/multimedia use, so next couple of updates will be on Home Automation lines. So do drop in your suggestions.

shivasiddharth commented 6 years ago

@Pancer1 , is that domain name your HA server ip ? Looks pretty much doable.

Pancer1 commented 6 years ago

@shivasiddharth my.domain.com is my domain registered in public DNS. It points to my public IP on router, where it's redirected (NAT/PAT) to my Home Assistant internal IP.

VinceW31 commented 6 years ago

Ragoth, no problem, give me a couple of days to write instructions and I would be happy to send you the files to try out. Please feel free to send any comments on issues etc.

rarenu commented 6 years ago

Thank you so much and I will wait for your instructions. With Great Regards, Ragothaman R.

On 29-Jan-2018 3:44 AM, "Vince Williams" notifications@github.com wrote:

Ragoth, no problem, give me a couple of days to write instructions and I would be happy to send you the files to try out. Please feel free to send any comments on issues etc.

From: rarenu [mailto:notifications@github.com] Sent: 27 January 2018 23:55 To: shivasiddharth/GassistPi Cc: VinceW31; Comment Subject: Re: [shivasiddharth/GassistPi] Feature requests (#20)

Dear Mr. VinceW31, great work!! This is what I have requested Mr. Sid also to include sometime back. Can you please share the changes you made, for me to try out. Thanks in advance ragoth@gmail.com — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ shivasiddharth/GassistPi/issues/20#issuecomment-361025708 , or mute the thread https://github.com/notifications/unsubscribe-auth/ AfudlmXoyuXwdjmgRmh68MkZ2inSbBgyks5tO7degaJpZM4PhvwE . < https://github.com/notifications/beacon/AfudlviShh- 6bPzsbTVVBJJof5BhmsE1ks5tO7degaJpZM4PhvwE.gif>

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/shivasiddharth/GassistPi/issues/20#issuecomment-361101054, or mute the thread https://github.com/notifications/unsubscribe-auth/AF2WCieBa8ZbD_XpUPEEC-QqX75cIma4ks5tPPE4gaJpZM4PhvwE .

shivasiddharth commented 6 years ago

@Pancer1 , Is this part that you posted from Home Assistant or HA-Bridge config file ? Would it be possible to attach one of those config files (with presonal info like ip replaced with arbitrary numbers)? I am looking at a way directly to parse the file and send respective commands.