From 2f7cda4b6dcc1feb03d041eb7e41b293d223e4f5 Mon Sep 17 00:00:00 2001 From: Georg Tomitsch Date: Tue, 1 Apr 2025 23:38:35 +0000 Subject: [PATCH] Refactored everything into modules. --- public/index.html | 26 +--------- public/js/ai-fiction.js | 13 ++--- public/js/input-handler.js | 5 +- public/js/kokoro-handler.js | 6 +-- public/js/socket-client.js | 5 +- public/js/speech.js | 54 +++++++++++++++++++++ public/js/tts-factory.js | 97 +++++++++++++++---------------------- public/js/tts-handler.js | 6 +-- 8 files changed, 107 insertions(+), 105 deletions(-) create mode 100644 public/js/speech.js diff --git a/public/index.html b/public/index.html index eaf0d85..90a9191 100644 --- a/public/index.html +++ b/public/index.html @@ -66,8 +66,7 @@ window.rstack = []; - - + - - - - - - - - - - - - - - - - - - - - - - + diff --git a/public/js/ai-fiction.js b/public/js/ai-fiction.js index 015441e..25808ac 100644 --- a/public/js/ai-fiction.js +++ b/public/js/ai-fiction.js @@ -9,12 +9,10 @@ import { LayoutRenderer } from './layout-renderer.js'; import { AudioManager } from './audio-manager.js'; import { TtsPlayer } from './tts-player.js'; import { PersistenceManager } from './persistence-manager.js'; -// import { InkStoryPlayer } from './ink-story-player.js'; // Replaced by SocketClient logic +import { InputHandler } from './input-handler.js'; +import { SocketClient } from './socket-client.js'; import { UiController } from './ui-controller.js'; -// Assuming InputHandler and SocketClient are loaded globally via