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.
This commit is contained in:
Anthony
2025-11-19 19:33:34 +08:00
parent 860124c0e0
commit 0775104b69
16 changed files with 1122 additions and 8 deletions

35
types.ts Normal file
View File

@@ -0,0 +1,35 @@
export enum VoiceName {
Puck = 'Puck',
Charon = 'Charon',
Kore = 'Kore',
Fenrir = 'Fenrir',
Zephyr = 'Zephyr',
}
export enum PlaybackStatus {
IDLE = 'IDLE',
LOADING_TEXT = 'LOADING_TEXT',
LOADING_AUDIO = 'LOADING_AUDIO',
READY = 'READY',
PLAYING = 'PLAYING',
PAUSED = 'PAUSED',
ERROR = 'ERROR',
COMPLETED = 'COMPLETED'
}
export interface Article {
id: string;
url: string;
title: string;
text: string;
audioUrl?: string; // Blob URL for the WAV file
status: PlaybackStatus;
errorMessage?: string;
}
export interface PlayerState {
isPlaying: boolean;
playbackRate: number;
currentArticleId: string | null;
selectedVoice: VoiceName;
}