VoiceVerse is a PDF reader for macOS that supports text-to-speech and PDF highlighting.
- 🎯 Auto-highlighting of spoken text🌟
- 🔊 Text-to-speech
- ⌨️ Keyboard shortcuts
- 📍 Smart positioning of current reading location🌟
- Voice API integration
- Open PDF: Command + o
- Next page: Command + →
- Previous page: Command + ←
- Next sentence: →
-
VoiceVerseApp.swift: Application entry point, responsible for app initialization and main window configuration. Provides unified menu command support for file operations, view control, and page navigation.
-
ContentView.swift: Main view container, responsible for overall layout and component organization. Integrates PDF viewer, toolbar, and progress bar, handles file import and basic interaction logic.
-
PDFViewerView.swift: Core PDF reader component, encapsulating PDFKit's PDFView. Features include:
- PDF document display and interaction (zoom, page turning, scrolling)
- Page layout control (single page, two pages, continuous modes)
- Progress bar display and navigation
- Integration with speech synthesis system
-
SentenceManager.swift: Sentence manager, handles text processing and reading control:
- Intelligent sentence segmentation
- Sentence navigation (previous/next)
- Multi-page text management
- Reading progress tracking
-
SpeechManager.swift: Speech synthesis manager, responsible for text-to-speech functionality:
- Text-to-speech based on AVSpeechSynthesizer
- Reading control (play, pause, resume, stop)
- Automatic/manual reading mode switching
- Speech status management and callback handling
-
HighlightManager.swift: Highlight display manager, handles text highlighting:
- Precise text location and highlighting
- Multi-page highlight synchronization
- Highlight animation and scroll control
- Highlight state management and cleanup
-
TextLocationManager.swift: PDF text location manager, responsible for precise text location and validation:
- Text segmentation: Intelligently splits long text into segments for accurate positioning
- Text search: Searches for text segments in PDF pages, supporting current and adjacent pages
- Position validation: Validates positional relationships between found text segments
- Cache management: Implements search result caching for improved performance