Life Log Implementation - Reading the Novel 『Exhalation』

2025-11-24

Photo

While reading Ted Chiang’s SF novel 『Exhalation』, I discovered a technology called life logging in the short story titled “The Truth of Fact, the Truth of Feeling.” The book describes life logging as a human black box, but I wanted to try to realistically implement this technology.

Of course, realistically implementing life logging as depicted in the book is impossible. I don’t go around carrying a camera, nor do I have storage to save that much video footage. However, rather than collecting all information, I decided to try to gather as much data as possible using the sensors of my MacBook and iPhone. The iPhone requires creating an app, which involves installing Xcode and many cumbersome procedures, so I decided to first create a program in Python that runs continuously on my MacBook.

Photo

The script logger.py captures the MacBook screen every minute and records audio for three seconds. It uses Tesseract for OCR to extract text and stores only the text in SQLite, and it measures and stores the decibel level of the recorded audio using portaudio and sounddevice. It also saves the currently active app and window title via AppleScript. Running this script with launchd continuously in the background completes the setup.

The next step is to visualize the saved data. Since the data is local and will only be run locally, I created a multi-page app using Streamlit. I created home.py, util.py, pages/analysis.py, and pages/rawdata.py, each visualizing the appropriate analytical tools. This also runs continuously via launchd after opening locally, and the screen can be viewed through a web browser.

Photo

Because I did vibe coding (not actual coding) using Gemini, it took about three hours. I ended up spending time on a pointless task suddenly, but it was fun nonetheless.

The full implementation code is available on this GitHub repository.