Pre-generate Read Aloud audio on desktop for offline playback on mobile

I would like to explore contributing support for pre-generating Read Aloud audio on Zotero Desktop and playing the generated audio offline on Zotero for Android.

The main use case is preparing academic papers for listening before leaving a computer. The desktop client would use Zotero’s existing Structured Document Text and Read Aloud pipeline, preserving its handling of columns, page transitions, citations, headers, footers, tables, and other document structure.

A mobile device could then download the generated result and play it without synthesizing the document again.

While investigating the current source, I found that:

- Read Aloud segments already contain serializable SDT positions.
- Desktop additionally materializes source and paragraph positions.
- The desktop audio interface already returns audio blobs and optional word timestamps.
- The Android reader already exposes APIs for obtaining Read Aloud segments, converting SDT
anchors to source positions, and creating Read Aloud annotations.

This suggests that the feature could reuse the existing document-analysis and annotation infrastructure rather than introduce a separate PDF-processing pipeline.

I’m considering contributing to the open-source project by implementing something along these lines, but I have a few initial questions:

1. Is cross-device pre-generation or offline playback already part of the Android Read Aloud roadmap?

2. Would the Zotero team be interested in accepting this functionality as an upstream
contribution?

3. If so, I was thinking of starting with a small Reader API that returns a serializable snapshot of the native Read Aloud segments. Would that make sense as a first contribution?

4. Are there any constraints around persistently storing audio returned by Zotero Voices that should shape the design from the beginning?

5. Would generated audio be better represented as derived attachment data, application-managed sync data, or something outside the normal attachment-syncing system?

I would be happy to prepare a short technical design for discussion on zotero-dev before writing
a larger patch.

  • Thanks, but if offline playback is something you're interested in, it's sufficient to just note your interest here. We would implement it ourselves.
Sign In or Register to comment.