mirror of
https://github.com/Tony0410/News-reader-pro.git
synced 2026-05-24 21:31:44 +08:00
Major feature update: Enhanced RSS, voice fixes, dark mode, and UI improvements
## New Features - Article Summary Mode: AI-generated 30-second summaries with complexity analysis - Reading Stats Dashboard: Track articles read, listening time, and streaks - Bookmark/Resume: Auto-save progress when pausing, resume from where you left off - Audio Export: Export articles as downloadable WAV files - RSS Feed Manager: Subscribe to feeds with real-time validation and 31+ recommendations - Smart Speed: Auto-adjust playback based on article complexity - Voice Moods: Quick presets for different listening scenarios ## RSS Enhancements - Expanded recommendations from 8 to 31 sources across 5 categories: * General News (9 sources) * Technology (8 sources) * Business & Finance (5 sources) * Science & Research (5 sources) * International News (4 sources) - Real-time URL validation with visual feedback - Detailed error messages for different failure scenarios - Always-visible categorized recommendations - Auto-loading articles when feeds are added ## Bug Fixes - Fixed voice selection: Selected voice now consistently applies to playback - Implemented voice generation counter to prevent voice mixing between paragraphs - Fixed speed control to snap to clean 0.5 increments (1.0, 1.5, 2.0, etc.) - Fixed dark mode toggle by configuring Tailwind CDN for class-based dark mode - Removed vibe visualizer animation ## UI/UX Improvements - Redesigned voice selector with prominent voice panel and preview functionality - Added voice cards with emojis and descriptions - Enhanced feature toolbar with quick access to all new features - Improved reader view with better typography and reading modes - Added ambient reading modes (clean, sepia, night light) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
99
constants.ts
99
constants.ts
@@ -2,12 +2,48 @@
|
||||
import { VoiceName } from './types';
|
||||
|
||||
export const AVAILABLE_VOICES = [
|
||||
{ name: VoiceName.Puck, label: 'Puck (Standard American, Male)' },
|
||||
{ name: VoiceName.Charon, label: 'Charon (Deep, Authoritative Male)' },
|
||||
{ name: VoiceName.Kore, label: 'Kore (Soft, Calm Female)' },
|
||||
{ name: VoiceName.Fenrir, label: 'Fenrir (Mid-Atlantic/British Style, Male)' },
|
||||
{ name: VoiceName.Zephyr, label: 'Zephyr (Clear, Professional Female)' },
|
||||
{ name: VoiceName.Aoede, label: 'Aoede (Confident, Professional Female)' },
|
||||
{
|
||||
name: VoiceName.Puck,
|
||||
label: 'Puck',
|
||||
description: 'Standard American, Male',
|
||||
emoji: '🎙️',
|
||||
previewText: "Hey there! I'm Puck, your friendly news companion. Let me read the latest stories for you."
|
||||
},
|
||||
{
|
||||
name: VoiceName.Charon,
|
||||
label: 'Charon',
|
||||
description: 'Deep & Authoritative, Male',
|
||||
emoji: '🎭',
|
||||
previewText: "Good day. I am Charon. I bring you the news with clarity and gravitas."
|
||||
},
|
||||
{
|
||||
name: VoiceName.Kore,
|
||||
label: 'Kore',
|
||||
description: 'Soft & Calming, Female',
|
||||
emoji: '🌸',
|
||||
previewText: "Hello, I'm Kore. Let me gently guide you through today's stories in a calm, relaxing tone."
|
||||
},
|
||||
{
|
||||
name: VoiceName.Fenrir,
|
||||
label: 'Fenrir',
|
||||
description: 'British Style, Male',
|
||||
emoji: '🎩',
|
||||
previewText: "Good evening. I'm Fenrir, bringing you the news with a touch of British sophistication."
|
||||
},
|
||||
{
|
||||
name: VoiceName.Zephyr,
|
||||
label: 'Zephyr',
|
||||
description: 'Clear & Professional, Female',
|
||||
emoji: '✨',
|
||||
previewText: "Hi, I'm Zephyr. I deliver your news with crystal clear precision and professionalism."
|
||||
},
|
||||
{
|
||||
name: VoiceName.Aoede,
|
||||
label: 'Aoede',
|
||||
description: 'Confident & Warm, Female',
|
||||
emoji: '🌟',
|
||||
previewText: "Hello! I'm Aoede. I'll share the day's stories with warmth and confidence."
|
||||
},
|
||||
];
|
||||
|
||||
export const MIN_SPEED = 0.5;
|
||||
@@ -15,3 +51,54 @@ export const MAX_SPEED = 3.5;
|
||||
export const SPEED_STEP = 0.5;
|
||||
|
||||
export const SAMPLE_RATE = 24000;
|
||||
|
||||
// Voice Moods - preset configurations for different listening contexts
|
||||
export const VOICE_MOODS: import('./types').VoiceMoodConfig[] = [
|
||||
{
|
||||
id: 'neutral',
|
||||
label: 'Neutral',
|
||||
emoji: '🎧',
|
||||
description: 'Balanced, everyday listening',
|
||||
recommendedVoice: VoiceName.Puck,
|
||||
recommendedSpeed: 1.0
|
||||
},
|
||||
{
|
||||
id: 'energetic',
|
||||
label: 'Energetic',
|
||||
emoji: '⚡',
|
||||
description: 'Upbeat morning news',
|
||||
recommendedVoice: VoiceName.Zephyr,
|
||||
recommendedSpeed: 1.2
|
||||
},
|
||||
{
|
||||
id: 'calm',
|
||||
label: 'Calm',
|
||||
emoji: '🌿',
|
||||
description: 'Relaxed, peaceful listening',
|
||||
recommendedVoice: VoiceName.Kore,
|
||||
recommendedSpeed: 0.9
|
||||
},
|
||||
{
|
||||
id: 'professional',
|
||||
label: 'Professional',
|
||||
emoji: '💼',
|
||||
description: 'Business & serious topics',
|
||||
recommendedVoice: VoiceName.Charon,
|
||||
recommendedSpeed: 1.0
|
||||
},
|
||||
{
|
||||
id: 'bedtime',
|
||||
label: 'Bedtime',
|
||||
emoji: '🌙',
|
||||
description: 'Soothing for sleep',
|
||||
recommendedVoice: VoiceName.Kore,
|
||||
recommendedSpeed: 0.8
|
||||
}
|
||||
];
|
||||
|
||||
// Smart Speed multipliers based on article complexity
|
||||
export const SMART_SPEED_MULTIPLIERS = {
|
||||
simple: 1.2, // Faster for simple content
|
||||
moderate: 1.0, // Normal speed
|
||||
complex: 0.85 // Slower for complex content
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user