-
Notifications
You must be signed in to change notification settings - Fork 693
Add instructions for setting up on Raspbian in voicekit branch. #149
Conversation
I intended to create a second pull request for adding the IP address action, but that commit got combined with this one. (Sorry, I'm fairly new to using GitHub.) @drigz commented on #138 that a PR to add this action would be welcome. There was a PR to add this a few days ago that was killed by the submitter, so I thought I would try to revive it. I initially had issues getting the "ip address" command to work, but capitalizing "IP" made Assistant recognize it. I also added "raspberry" in front of the "power off" and "reboot" commands, and fixed the indentation of the |
@t1m0thyj FYI to make separate pull requests and also in general before working on a forked repo it is better to make your own working branches. You can do this very easily through the website of github. See https://github.com/blog/1377-create-and-delete-branches. |
@divx118 Should I just do that in the future, or do you want me to close this PR and create new ones in the way you described? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, @t1m0thyj!
HACKING.md
Outdated
|
||
## Installing the Voice HAT driver and config | ||
|
||
To use the Voice HAT, you'll need to upgrade your kernel to 4.9, then adjust the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true as Raspbian ships with 4.9 since 2017-07-05. Please remove the apt-get commands and add to the text something like "Your kernel needs to be 4.9 or later. This is available on Raspbian 2017-07-05 and later."
HACKING.md
Outdated
sudo systemctl enable voice-recognizer.service | ||
``` | ||
|
||
# I18N |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the I18N section, since the samples don't contain internationalized code.
@@ -50,6 +50,11 @@ def reboot_pi(): | |||
subprocess.call('sudo reboot', shell=True) | |||
|
|||
|
|||
def say_ip(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split the addition of this command out into a separate PR. As @divx118 says, it's much better to split changes up - then one can be merged even if the other is still being reviewed.
HACKING.md
Outdated
[setup instructions](https://aiyprojects.withgoogle.com/voice#users-guide-1-1--connect-to-google-cloud-platform) on the | ||
webpage. | ||
|
||
# Making code changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This heading doesn't make sense - not all of the following text should be under "Making code changes". Maybe just add "## Running automatically" before the service bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure whether there should be 1 or two hash signs before "Making code changes" to make it either a level 1 or a level 2 header. I changed it to two, because I didn't think "Running automatically" belonged under it.
assistant.stop_conversation() | ||
power_off_pi() | ||
elif text == 'reboot': | ||
elif text == 'raspberry reboot': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert the addition of "raspberry". Since this is just a sample and everyone has different preferences, I prefer to keep it simple.
Removed IP address action from this PR and updated |
HACKING.md
Outdated
sudo scripts/install-services.sh | ||
``` | ||
|
||
## Installing the Voice HAT driver and config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also change this header to "Configuring the Voice HAT driver" since we're not installing now?
Excellent, thanks so much @t1m0thyj! |
This PR is my attempt to fix #148. I've added back the files
HACKING.md
andsystemd/voice-recognizer.service
which were in the master branch. I also updated the instructions inHACKING.md
to work with the voicekit branch.IMO these files are too useful to not be present in the new branch, and having them there doesn't change the way that this project behaves for anyone who doesn't want to use them.
The way the
install-services.sh
script is currently written, it will automatically add any services in thesystemd
folder to the/lib/systemd/system
folder on the Pi, includingvoice-recognizer.service
if it is present. It will also replace any references to/home/pi
in the service file, updating them to the correct installation folder. However, the service will never run unless it is explicitly enabled by the user.