diff --git a/CHANGELOG.md b/CHANGELOG.md index a2c0d77..7902294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ## [Unreleased] ### Changed +- **Generation namespace migration.** WAV merging, chunked TTS, history, playlist, effects, and refinement helpers now + use a private scope with explicit compatibility exports and a `window.TTVC.generation` API. - **STT namespace migration.** STT backend selection, microphone recording, voice loading, and STT-to-TTS helpers now use a private scope with live compatibility accessors and a `window.TTVC.stt` API. - **AI-backend namespace migration.** LLM snippets and backend interaction controls now live behind a private section scope diff --git a/VERSION b/VERSION index da128ef..b7a47c2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.83 +1.24.84 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 560237b..43ae090 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -73,6 +73,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed) - ✅ Integration endpoint and API-snippet helpers use a private scope with explicit voice/endpoint compatibility exports. - ✅ AI-backend section interactions and snippet initialization use a private scope with an explicit namespace API. - ✅ STT backend, recording, voice-loading, and STT-to-TTS helpers use a private scope with live compatibility accessors. +- ✅ Generation audio/history/playlist helpers use a private scope with explicit compatibility exports and a namespace API. - ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles. - ✅ `static/css/background-jobs.css` — isolated background-job history and retry-panel styles. - ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles. diff --git a/static/index.html b/static/index.html index f372145..eaaced4 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/generation.js b/static/js/generation.js index 445fd70..65e9971 100644 --- a/static/js/generation.js +++ b/static/js/generation.js @@ -1,5 +1,7 @@ // ── WAV merge utility (chunked TTS + playlist export) ────────────────────── +(function (root) { + function _parseWavBytes(bytes) { const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); let off = 12, fmt = null, dataOff = 0, dataSize = 0; @@ -495,3 +497,19 @@ $('preview-style-instruction')?.addEventListener('input', () => { if (typeof updateBackendHelp === 'function') updateBackendHelp(); }); +Object.assign(root, { + _parseWavBytes, _buildWavBlob, _silencePcmBytes, mergeWavBlobs, + splitTextIntoChunks, generateChunkedTts, _genHistory, historyPush, + _histAvatarColor, renderHistory, _playlist, playlistAdd, renderPlaylist, + _FX_PRESETS, fxSliderBind, _effectsSourceBlob, _refineOriginal, + updateRefineButtonState, +}); +root.TTVC = root.TTVC || {}; +root.TTVC.generation = root.TTVC.generation || {}; +Object.assign(root.TTVC.generation, { + audio: { merge: mergeWavBlobs, chunkedTts: generateChunkedTts }, + text: { splitChunks: splitTextIntoChunks }, + history: { render: renderHistory, push: historyPush }, + playlist: { add: playlistAdd, render: renderPlaylist }, +}); +})(window);