Skip to content

Commit

Permalink
picture preview
Browse files Browse the repository at this point in the history
  • Loading branch information
hbarnard committed Dec 14, 2022
1 parent 76470d3 commit 0641231
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Binary file modified db/memories.db
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 @@ -23,6 +23,7 @@ use_external_ai = no

#FIXME: now uses libcamera this is about the simplest set of options
picture_command = libcamera-jpeg --nopreview -o
#picture command = DISPLAY=:0 libcamera-jpeg -o

## --- problematic video section --- ##
# this doesn't do sound currently, need to recompile ffmpeg or move to cvlc?
Expand All @@ -49,9 +50,9 @@ audio_maximum = 30
label_program = /home/pi/mema/label_video.py

#FIXME: this is problematic, replace with jaro
xdg_open_command = handlr launch x-scheme-handler/http -- http://localhost:8000/memories.html
#xdg_open_command = handlr launch x-scheme-handler/http -- http://localhost:8000/memories.html
#jaro_open_command = jaro http://localhost:8000/memories.html
#xdg_open_command = /home/hbarnard/projects/mema/browser.py
xdg_open_command = http://localhost:8000/memories.html
#xdg_search_open = xdg-open https://google.com?q=mema

keyword_slot_file = ~/.config/rhasspy/profiles/en/slots/keywords
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ apt install ffmpeg
apt install libcamera-apps
apt install pulseaudio
apt install vlc
apt install ntp
# docker
sudo apt install docker.io
# no get_docker instead sudo apt install docker.io
echo '*-------------------------------------------------------------------------------*'
echo 'installing mema3'
echo 'install python3 packages, make take a while'
Expand Down
3 changes: 2 additions & 1 deletion take_picture.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def main():
try:
subprocess.call(picture_command_array, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
logging.debug('taking picture error')
raise RuntimeError("command '{}' return here with error (code {}): {}".format(e.cmd, e.returncode, e.output))
dots[0] = (0,255,0) # red
else:
Expand All @@ -81,7 +82,7 @@ def main():
else:
mu.curl_speak(config['en_prompts']['done'])


logging.debug('end of taking picture')
dots.deinit() if pi else None
print(result + "|" + media_path)

Expand Down

0 comments on commit 0641231

Please sign in to comment.