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:
35
types.ts
Normal file
35
types.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user