How xujialiu/zotero-openreader works
Zotero-OpenReader is a Zotero 10 text-to-speech plugin. A user chooses a provider and voice in its player, starts reading a Zotero document, and the plugin coordinates speech, playback, highlighting, and saved reading position. Its runtime also supports voice discovery and samples, configurable shortcuts and text replacements, and backup/sync. The graph combines excerpted call/import references with README-documented capabilities; some reading, highlighting, and synchronization implementations were not sampled, so their internal wiring is left unspecified.
Main entry points: index.ts Plugin runtime · session.ts Playback session · player.ts Player interface · reading-start.ts Reading start
Components 22
Zotero integration
- Plugin runtime
src/index.ts - Settings pane
src/ui/prefs-pane.ts
Reading and playback
- Player interface
src/ui/player.ts - Player controls
src/read-aloud/player-controller.ts - Reading start
src/read-aloud/reading-start.ts - Document text
src/read-aloud - Read-aloud engine
src/read-aloud/engine/index.ts - Playback session
src/core/engine/session.ts - Audio output
src/read-aloud/engine/audio-output.ts - Reading highlights
src/read-aloud/highlight-style.ts - Position resume
src/read-aloud/read-aloud-memory.ts
Voices and speech
- Voice browser
src/ui/voice-browser-rows.ts - Voice catalog
src/read-aloud/voice-catalog.ts - Speech providers
src/core/providers/factory.ts - System voices
src/core/providers/system/index.ts
Settings and continuity
- Preferences
src/core/settings.ts - Text replacements
src/core/replacements.ts - Keyboard shortcuts
src/ui/read-aloud-shortcuts.ts - Settings backup
src/core/settings-backup.ts - Settings sync
src/core/settings-sync-transport.ts
Other components
- Zotero reader
- WebDAV storage
Connections 25
- Zotero reader → Plugin runtime: starts plugin
- Plugin runtime → Player interface: creates
src/index.ts - Plugin runtime → Reading start: starts reading
src/index.ts - Plugin runtime → Settings pane: opens settings
- Player interface → Player controls: delegates controls
src/ui/player.ts - Player controls → Playback session: controls playback
src/read-aloud/player-controller.ts - Reading start → Document text: extracts text
- Read-aloud engine → Playback session: runs session
src/read-aloud/engine/index.ts - Playback session → Audio output: plays speech
src/read-aloud/engine/index.ts - Read-aloud engine → Reading highlights: updates highlights
- Playback session → Position resume: saves position
- Player interface → Voice browser: opens browser
- Voice browser → Voice catalog: lists voices
src/ui/voice-browser-rows.ts - Voice catalog → Speech providers: names providers
src/read-aloud/voice-catalog.ts - Speech providers → System voices: supports system speech
- Playback session → Speech providers: requests synthesis
- Settings pane → Preferences: configures
src/ui/prefs-pane.ts - Plugin runtime → Preferences: loads preferences
src/index.ts - Reading start → Text replacements: applies replacements
- Plugin runtime → Keyboard shortcuts: registers shortcuts
src/index.ts - Plugin runtime → Settings backup: uses backup
src/index.ts - Settings backup → Preferences: exports settings
src/core/settings-backup.ts - Plugin runtime → Settings sync: starts sync
src/index.ts - Settings sync → WebDAV storage: transfers settings
- Position resume → WebDAV storage: syncs positions