refactor: scope generation module
This commit is contained in:
parent
ababdf6741
commit
1b7d6b2346
@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed
|
### 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
|
- **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.
|
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
|
- **AI-backend namespace migration.** LLM snippets and backend interaction controls now live behind a private section scope
|
||||||
|
|||||||
@ -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.
|
- ✅ 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.
|
- ✅ 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.
|
- ✅ 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/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles.
|
||||||
- ✅ `static/css/background-jobs.css` — isolated background-job history and retry-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.
|
- ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles.
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no">
|
||||||
<meta name="color-scheme" content="light dark">
|
<meta name="color-scheme" content="light dark">
|
||||||
<meta name="theme-color" content="#2563EB">
|
<meta name="theme-color" content="#2563EB">
|
||||||
<meta name="app-version" content="1.24.83">
|
<meta name="app-version" content="1.24.84">
|
||||||
<link rel="manifest" href="/manifest.webmanifest">
|
<link rel="manifest" href="/manifest.webmanifest">
|
||||||
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
|
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
|
||||||
<link rel="apple-touch-icon" href="/static/icon.svg">
|
<link rel="apple-touch-icon" href="/static/icon.svg">
|
||||||
@ -27,12 +27,12 @@
|
|||||||
|
|
||||||
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
|
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
|
||||||
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
|
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
|
||||||
<link rel="stylesheet" href="/static/style.css?v=1.24.83">
|
<link rel="stylesheet" href="/static/style.css?v=1.24.84">
|
||||||
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.83">
|
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.84">
|
||||||
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.83">
|
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.84">
|
||||||
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.83">
|
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.84">
|
||||||
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.83">
|
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.84">
|
||||||
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.83">
|
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.84">
|
||||||
|
|
||||||
|
|
||||||
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
|
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
|
||||||
@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
|
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
|
||||||
<script src="/static/loader.js?v=1.24.83"></script>
|
<script src="/static/loader.js?v=1.24.84"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
// ── WAV merge utility (chunked TTS + playlist export) ──────────────────────
|
// ── WAV merge utility (chunked TTS + playlist export) ──────────────────────
|
||||||
|
|
||||||
|
(function (root) {
|
||||||
|
|
||||||
function _parseWavBytes(bytes) {
|
function _parseWavBytes(bytes) {
|
||||||
const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
||||||
let off = 12, fmt = null, dataOff = 0, dataSize = 0;
|
let off = 12, fmt = null, dataOff = 0, dataSize = 0;
|
||||||
@ -495,3 +497,19 @@ $('preview-style-instruction')?.addEventListener('input', () => {
|
|||||||
if (typeof updateBackendHelp === 'function') updateBackendHelp();
|
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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user