Skip to content

Commit

Permalink
take picture debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
hbarnard committed Dec 14, 2022
1 parent 613023b commit 833983a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
Binary file modified __pycache__/intent_server.cpython-39.pyc
Binary file not shown.
5 changes: 3 additions & 2 deletions etc/mema.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ transcribe_program = /home/pi/whisper.cpp/main -f
# time to reload rhasspy docker container tunable
rhasspy_reload = 10

#FIXME: logging used now: into deb like directory structure, need config file though
#FIXME: logging used now: prepare for deb like directory structure, need config file though
debug = yes
logfile_name = var/spool/mema3.log

#FIXME: whisper.cpp soon set to false, to leave things unlabelled etc., since currently external service
#FIXME: needs to be on script by script basis, actually
use_external_ai = no

#FIXME: now uses libcamera this is about the simplest set of options
Expand Down Expand Up @@ -91,5 +92,5 @@ what_kind = What_kind_of_pie_would_you_like?
#FIXME: should be [literals][en] as above
[en_literals]
unlabelled_video = unlabelled video recording
unlabelled_picture = unlablled still image
unlabelled_picture = unlabelled still image
unlabelled_audio = unlabelled audio recording
11 changes: 9 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@ echo 'install python3 packages, make take a while'
echo '*-------------------------------------------------------------------------------*'
sudo -H pip install -r requirements.txt
#FIXME: voice bonnet stuff: not happy about this, does tons of 'other stuff' as well!
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py
sudo python3 raspi-blinka.py
# read the docs
#wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py
#sudo python3 raspi-blinka.py
# cant find board
#sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel
#sudo python3 -m pip install --force-reinstall adafruit-blinka



echo '*-------------------------------------------------------------------------------*'
echo 'installing intent server service'
cp etc/systemd/intent_server.service /etc/systemd/system/
Expand Down
1 change: 1 addition & 0 deletions intent_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def run_photo_command(number,please):
cur = con.cursor()
# picture = local[config['main']['picture_program']]
picture = subprocess.check_output(config['main']['picture_program'])
print('picture is: ' + picture.decode("utf-8"))
result = picture()
(text, file_path) = result.split('|')
file_path.rstrip()
Expand Down
Binary file modified memalib/__pycache__/mema_utility.cpython-39.pyc
Binary file not shown.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
board
configobj
datetime
fastapi
Expand Down
3 changes: 1 addition & 2 deletions take_picture.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def main():
DOTSTAR_DATA = board.D5
DOTSTAR_CLOCK = board.D6
dots = adafruit_dotstar.DotStar(DOTSTAR_CLOCK, DOTSTAR_DATA, 3, brightness=0.2)
dots.deinit()


config = ConfigObj('etc/mema.ini')
logging.basicConfig(filename=config['main']['logfile_name'], format='%(asctime)s %(message)s', encoding='utf-8', level=logging.DEBUG)

Expand Down

0 comments on commit 833983a

Please sign in to comment.