feat(04-01): add audio/speech modules and speechEnabled to Settings
- Create src/audio/sounds.ts with playCorrectSound, playRewardSound, playForestElementSound - Create src/audio/speech.ts with speakText via Web Speech API - Add speechEnabled field to Settings interface in types.ts - Add speechEnabled defaults in all Settings initializers (gemini.ts, parent.ts, db.test.ts) - All sound functions check audioEnabled, speakText checks speechEnabled - AudioContext lazy initialization for autoplay policy compliance
This commit is contained in:
@@ -53,6 +53,7 @@ export interface ForestElement {
|
||||
export interface Settings {
|
||||
id: 1; // singleton
|
||||
audioEnabled: boolean;
|
||||
speechEnabled: boolean;
|
||||
apiKey: string;
|
||||
apiCallsToday: { text: number; image: number };
|
||||
lastApiCallDate: string; // ISO date "YYYY-MM-DD"
|
||||
|
||||
Reference in New Issue
Block a user