Voice database query?

I have a project at home and I’ve been looking at different devices but so far nothing seems quite able to do what I want.

I have a LOT of comic books at home, neatly arranged on racks in a series of 88 boxes:

The data is stored as a simple CSV file:

Title, Author, Penciler, Inker, Issue #, Publisher, Value, Notes, Box #

What I want to be able to do is voice query the data:

“Hey listen: Where is Title: X-Men Issue Number: 141?” and have it respond back with “That book is in box number 86.” Or what have you.

Eventually, I’d like to be able to have smart lights on each shelf and have it turn on the appropriate light for each box and do multi queries:

“Hey listen: Show me Author: Marv Wolfman.” and have it light up all the boxes with matching content.

Is this the sort of thing that can be done here?

Yes! This is exactly the sort of project that we are trying to enable people to make for themselves. A visual database query. That’s really neat. You can do it right now with the Voice, as is, or in MATRIX OS, which will make it much easier.

Excellent! I have the back half of the query working using a couple of awesome tools I found, CSVKit allows me to query the CSV file in the way I want (using the column headings, matching the pattern I want.)


Festival reads the results out loud:


It looks like this: csvgrep -c (column to search) -m (pattern to match) | csvcut -c Location | uniq | festival --tts

Csvgrep searches the column identified for the matching pattern, csvcut removes all extraneous data except for the box location, uniq removes any duplicate information (for example, if I search for “X-Men” it returns 300 items all in the same box, I only need one listing for the box.) Then festival reads the results out loud. All that is working.

The pieces I’m missing so far are the front end. I’m trying it with a Blue USB microphone which doesn’t seem to work yet on the Pi :frowning: that’s tonight’s project. Then I need a way to capture the two variables and pass them to the csvgrep command.

I’ll hit you up on your crowd-funding page. Looks like you still have some of the $55 levels available.