gutendex: read a book aloud over a voice front end

read_book now checks the local library first: a book already saved (matched by
Project Gutenberg id, or by the name in the request) is read from disk with no
network at all, and a book resolved from the catalog is reused from disk rather
than re-downloaded.

When the request arrives from a front end that can stream a read-aloud (the
local voice gateway, or an LXMF/Sideband voice chat), the saved text is handed
to the scheduler's speech channel (ctx.speech) instead of being summarised: the
gateway streams it through Piper a chunk at a time until the user stops it, and
the position is kept in a bookmarks.json beside the saved books so a later
request resumes where the listener stopped. A text front end keeps the
saved-file summary, and the skill reports honestly when a book has no plain
text to read.

The skill asks ctx.speech.supports(source) on both the saved-library and the
fresh-download paths; the manifest/README describe the read-aloud and the
library-first behaviour.
This commit is contained in:
gabby committed 2026-10-17 23:29:50 +00:00
1 parent 52346baf52
commit 530e9968a4
4 files changed
+477 -58

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
{
"description": "Download the full text of a Project Gutenberg book by author or title and save it to a file, reporting the saved path."
"description": "Read a Project Gutenberg book by author or title: check the local library first, otherwise download the full text and save it; over the voice gateway, read it aloud until the user stops it, resuming from a saved bookmark."
}