Refactored everything into modules.

This commit is contained in:
2025-04-01 23:38:35 +00:00
parent 53f9eb9265
commit 2f7cda4b6d
8 changed files with 107 additions and 105 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
* Enhanced version with improved voice selection, caching, and playback controls
*/
class TTSHandler {
export class TTSHandler {
constructor() {
this.enabled = false;
this.speaking = false;
@@ -410,5 +410,5 @@ class TTSHandler {
}
}
// Create a global instance
const ttsHandler = new TTSHandler();
// Create and export a singleton instance
export const browserTtsHandler = new TTSHandler();