Commit Graph

13 Commits

Author SHA1 Message Date
Anthony
c610fcf88b Merge pull request #1 from Tony0410/codex/track-and-clean-up-audio-urls
Add cleanup for audio segment object URLs
2025-11-27 21:19:29 +08:00
Anthony
a48eba5613 Merge pull request #2 from Tony0410/codex/wrap-url-parsing-in-try/catch
Handle malformed article URLs
2025-11-27 21:19:00 +08:00
Anthony
061474c574 Handle malformed article URLs 2025-11-27 21:18:43 +08:00
Anthony
8e1dff0bb3 Add cleanup for audio segment object URLs 2025-11-27 21:18:30 +08:00
Anthony
7f75b44af1 fix: Update import map versions
Adjusted CDN versions for several dependencies in the import map to reflect latest stable releases. This ensures the application utilizes up-to-date libraries for improved performance and security.
2025-11-23 20:07:21 +08:00
Anthony
43435166f8 feat: Update dependencies and add new voice
- Updates project dependencies to latest versions for improved performance and security.
- Adds a new voice option, 'Aoede', to the available voices.
- Modifies the voice change handler to force re-generation of future audio segments for the selected article.
- Updates Vite configuration to align with newer Vite versions and load environment variables correctly.
- Adjusts TypeScript configuration for a more modern setup.
- Removes unnecessary configuration from Nginx file.
2025-11-19 20:46:02 +08:00
Anthony
0b10d71554 feat: Add buffering indicator and improve queue item removal
Introduces a visual indicator for when the reader is buffering, meaning it's supposed to be playing but the current audio segment is not yet available.

Also, prevents accidental article selection when clicking the "Remove" button in the queue by adding `stopPropagation`.
2025-11-19 20:36:39 +08:00
Anthony
dadebf8cd0 feat: Enhance article segment navigation
Implement segment selection in ReaderView for user-driven playback control. This change allows users to click on specific segments within an article to jump to and play that segment directly.

The Gemini service's HTML parsing has also been simplified by removing redundant selectors and focusing on essential tag removal for more efficient text extraction.
2025-11-19 20:28:14 +08:00
Anthony
8e902fd9c1 feat: Introduce reader settings and dark mode support
Adds a new `ReaderSettings` type to manage user preferences such as dark mode, font size, line height, font family, and auto-scroll behavior.

Implements dark mode styling for various UI components including the `VoiceSelector` and `QueueItem`, enhancing visual consistency.

Enhances the `ReaderView` component to respect the `autoScroll` setting and introduces basic text styling options based on the new settings.
2025-11-19 20:21:08 +08:00
Anthony
417d48ffdf feat: Improve text segmentation for faster playback
Implement a progressive text segmentation strategy. The first few segments are intentionally kept very short to allow playback to start almost immediately, creating a more responsive feel. As more segments are processed, their length gradually increases to optimize audio generation efficiency for the remainder of the article. Additionally, the title is now prepended as the very first segment. The buffer ahead is also increased to 5 segments to ensure content is ready.

Further refinements include:
- Enhanced voice descriptions in constants.
- Improved segment styling in ReaderView for better visual active state indication.
2025-11-19 20:15:39 +08:00
Anthony
78f1e0e93c feat: Segment article text for improved playback
Splits article content into smaller audio segments. This allows for more granular control over playback, faster processing, and improved user experience by enabling auto-scrolling to the currently read segment.

Updates `types.ts` to include `AudioSegment` interface and modify `Article` to hold `segments`, `currentSegmentIndex`, and `audioUrl` per segment.

Introduces `segmentText` utility in `services/textUtils.ts` for robust text segmentation logic.

Modifies `App.tsx` to utilize the new segmentation approach for fetching and processing audio.

Enhances `components/ReaderView.tsx` to display and auto-scroll through segmented text, highlighting the current segment during playback.
2025-11-19 19:57:43 +08:00
Anthony
0775104b69 feat: Initialize project with basic structure and dependencies
Sets up the foundational elements for the NewsCaster AI application. This includes:
- Initializing the project with Vite and React.
- Defining core types for articles and player state.
- Configuring build tools and TypeScript.
- Adding essential dependencies like React, Vite, and Google's Gemini API client.
- Providing initial README instructions for running locally.
- Setting up basic styling and structure in index.html.
- Defining available voices and playback constants.
- Implementing utility functions for audio handling.
2025-11-19 19:33:34 +08:00
Anthony
860124c0e0 Initial commit 2025-11-19 06:14:40 +08:00