Skip to content

feat: Configurable timestamped transcripts with performance optimizations #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

chhoumann
Copy link
Owner

@chhoumann chhoumann commented Jul 31, 2024

Timestamped Transcripts Improvements

This PR enhances the transcript functionality in PodNotes with configurable timestamps and performance optimizations.

Key Features

  • ✅ Configurable timestamps - users can enable/disable timestamp inclusion in transcripts
  • ✅ Adjustable timestamp range - control timestamp density with a range slider (1-10 seconds)
  • ✅ Expanded playback rates - added options from 0.25x to 3.0x for more flexibility
  • ✅ Improved segment joining - better handling of segment boundaries for more natural transcripts
  • ✅ Performance optimizations - non-blocking processing, memory efficiency, and parallel processing
  • ✅ Robust error handling - graceful recovery from failed segments without aborting the process

Technical Highlights

  • Memory Optimization: Generator-based file chunking and efficient text processing
  • Performance: Parallel processing with controlled concurrency to avoid blocking Obsidian's UI
  • Reliability: Comprehensive error handling at multiple levels
  • UX Improvements: Better progress reporting with throttled updates

Documentation

Updated documentation available for all new features:

  • Updated transcript documentation with new timestamp options
  • Enhanced timestamp documentation including new range capabilities
  • Updated main index to highlight the new features

Status

Ready for review. All major issues have been resolved.

Copy link

vercel bot commented Jul 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
podnotes ❌ Failed (Inspect) May 28, 2025 5:14pm

- Added settings for toggling timestamp inclusion in transcripts
- Added configurable timestamp range to control timestamp density
- Expanded playback rate options (0.25x to 3x)
- Improved transcript segment joining for better continuity
- Created detailed design document for timestamped transcription feature
- Update transcript documentation with new timestamp features
- Extend timestamp documentation to include timestamp ranges
- Add example files for documentation
- Update main index with new features
- Implement parallel processing of audio chunks with concurrency limits
- Replace array-based chunking with memory-efficient generators
- Add throttled UI updates to reduce rendering overhead
- Make transcript formatting asynchronous with batched processing
- Add explicit memory management for large audio files
- Insert strategic yields to main thread to maintain UI responsiveness
- Add graceful error recovery for failed transcription segments
- Insert placeholders for failed segments instead of aborting entire process
- Implement batch-level error handling to continue despite partial failures
- Update design document with error handling approach
- Provide user feedback through notices when segments fail
@chhoumann chhoumann changed the title Reworked player, timestamped transcripts feat: Configurable timestamped transcripts with performance optimizations Mar 14, 2025
@chhoumann chhoumann marked this pull request as ready for review March 14, 2025 21:41
chore: Restore design document
- Validate OpenAI API key before starting transcription
- Add functionality to cancel in-progress transcriptions
- Implement resume capability for interrupted transcriptions
- Add detailed progress tracking with size and time estimates
- Update UI to show resume options for interrupted transcripts
- Update documentation with new features
- Add more accurate time estimates for transcription process
- Add cancellation button directly in player UI
- Show loading indicators with animated spinner
- Improve progress calculation and display
- Add more visible success/failure notifications
- Add better cleanup of notices and commands
- Add dedicated progress UI in the player itself rather than just in notices
- Display more useful information like progress percent, time remaining, and processed size
- Provide better status updates during different phases of transcription
- Redesign progress display for better visibility and usability
- Fix progress estimation with more accurate time calculation
- Set isTranscribing flag immediately for instant UI feedback
- Show transcription UI progress as soon as the action is triggered
- Increase UI update frequency for more responsive progress display
- Improve state handling for better UX during transcription
- Use microtasks to ensure UI updates reliably
- Remove all toast notifications and centralize everything in the player UI
- Make UI immediately respond to transcription start and show progress
- Make transcription button disappear and show progress UI immediately
- Fix local state handling in EpisodePlayer for immediate UI updates
- Add smoother transitions between transcription states
- Show errors and success messages directly in the player UI
- Add polling mechanism to ensure UI is always updated
- Implement getters/setters with logging for debugging
- Track transcription progress in local component state
- Update progress UI with local state variables
- Poll for updates every 100ms to ensure responsive UI
- Add console logging to help debug reactivity issues
- Replace custom progress bar with HTML5 native progress element
- Improve progress tracking for more reliable UI updates
- Make time formatting more concise
- Ensure progress bar always shows visible progress
- Add method to check if transcript already exists
- Hide transcribe button when transcript already exists
- Show "Transcript exists" indicator instead of button
- Silently return from transcription service when transcript exists
- Remove error message when transcript already exists
…script exists

- Remove unnecessary "Transcript exists" indicator
- Simply hide the transcribe button when transcript exists for cleaner UI
- Add id property to Episode interface
- Add commands property to App2 interface
- Use proper TranscriptionVerbose type with segments
- Fix null checks and object type casting
chhoumann and others added 13 commits May 28, 2025 19:14
- Fix production build by updating esbuild config to use context API for watch mode
- Improve type safety in TranscriptionService by replacing 'any' types with proper interfaces
- Fix Svelte 5 store usage in components (use get() instead of $store in callbacks)
- Update svelte compiler options to use 'injected' for CSS
- Fix type imports and formatting in Episode and global type definitions
- Resolve all TypeScript compilation errors
- Add svelte.config.js for centralized Svelte 5 configuration
- Add biome.json for consistent linting rules across the project
- Fix all Biome linting issues in Svelte components:
  - Organize imports properly
  - Add type-only imports where needed
  - Remove unnecessary type annotations
  - Fix optional chaining usage
- Update esbuild config to use centralized Svelte configuration
- Fix Svelte 5 store usage compatibility (use get() instead of $store in callbacks)
- Add SVELTE5_MIGRATION.md guide for gradual migration to Svelte 5 runes
- Improve code consistency and maintainability

The project now builds successfully with Svelte 5.25.3 while maintaining
backward compatibility. Components can be gradually migrated to use
Svelte 5 runes following the migration guide.
- Replace clickable <span> elements with semantic <button> elements
- Add proper button styling to maintain visual appearance
- Remove unused imports (podcastView) and parameters (clickEvent)
- Improve keyboard navigation support
- Enhance screen reader compatibility

All accessibility warnings are now resolved and the component is
fully keyboard accessible.
- Enabled verbatimModuleSyntax in tsconfig.json for stricter import checking
- Fixed all type-only imports to use 'import type' syntax
- Separated mixed imports into value and type imports
- Ensures proper tree-shaking and cleaner builds
- Replace createEventDispatcher with callback props (onclick, onchange)
- Update all component usages to new callback prop pattern
- Fix event handler signatures to receive values directly
- Disable runes mode in config for gradual migration
- Fix self-closing tags for HTML compliance
- Fixed Button components to use text prop instead of children
- Fixed IconType assignment issues in PlaylistManager
- Replaced aria-label with tooltip prop in PodcastResultCard
- All type errors resolved, build succeeds
- Replace createEventDispatcher with callback props in PodcastResultCard
- Migrate Text component to use onchange callback prop
- Update all component usages to new callback pattern
- Fix event handler signatures to work with values directly
- Continued Svelte 5 migration pattern
…iation

- Added compatibility.componentApi: 4 to svelte.config.js
- Fixes 'component_api_invalid_new' error when opening PodcastView
- Allows legacy component instantiation with new Component()
- Critical fix for Obsidian plugin functionality
- Replaced manual store subscriptions with reactive statements ($:)
- Implemented proper memoization for episode fetching
- Added lazy loading for images with IntersectionObserver
- Optimized CSS animations using transform instead of box-shadow
- Reduced transition durations from 0.3s to 0.15s
- Added GPU acceleration with will-change and translateZ(0)
- Created event handlers once instead of on every render
- Optimized grid layout with contain property
- Fixed hover animations that were causing 2fps performance
- Replaced heavy CSS transitions with performant alternatives
- Added proper keying to lists for better reconciliation

These changes should dramatically improve the responsiveness and
smoothness of the podcast grid view, especially with many items.
- Removed broken IntersectionObserver lazy loading implementation
- Simplified Image component to work reliably
- Images should now load properly in the podcast grid
- Removed loading='lazy' prop that was causing issues
- Improved reactive statement memoization in PodcastView
- Added content-visibility and containment optimizations to grid
- Removed all CSS transitions and animations for maximum performance
- Simplified hover effects to only use opacity/border changes
- Should significantly improve responsiveness
- Use optional chaining for transcriptionService checks in API.ts
- Fix type-only imports in getContextMenuHandler.ts
- Apply consistent formatting with biome across all modified files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace reactive episode sorting with memoized function to prevent unnecessary recalculations
- Add caching layer to context menu generation for O(1) episode lookups
- Optimize DOM manipulation in Icon and Text components to only update on actual changes
- Fix TypeScript non-null assertion with proper null checking

These optimizations significantly reduce the delay on user interactions from hundreds of milliseconds to near-instant response.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant