refactor: scope voice sources
This commit is contained in:
parent
d219aec676
commit
28c72c76dd
@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- **Voice-source namespace migration.** Source URL management, filtering, source metadata normalization, and library
|
||||
import helpers now use a private scope with explicit compatibility exports and a `window.TTVC.voiceSources` API.
|
||||
- **Voice-clone namespace migration.** Clone audio loading/upload, microphone monitoring, design presets, and voice-design
|
||||
actions now use a private scope with explicit compatibility exports and a `window.TTVC.voiceClone` API.
|
||||
- **TTS preview namespace migration.** Backend voice selection, Fish emotion tags, preview synthesis, stream fallback,
|
||||
|
||||
@ -66,6 +66,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed)
|
||||
- ✅ Settings state and backend configuration use a private scope with live compatibility accessors and a namespace API.
|
||||
- ✅ TTS preview and performance-history helpers use a private scope with explicit preview/history compatibility exports.
|
||||
- ✅ Voice-clone audio, recording, and design controls use a private scope with explicit compatibility exports.
|
||||
- ✅ Voice-source discovery and import helpers use a private scope with explicit source-list/import compatibility exports.
|
||||
- ✅ `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.
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#2563EB">
|
||||
<meta name="app-version" content="1.24.76">
|
||||
<meta name="app-version" content="1.24.77">
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/static/icon.svg">
|
||||
@ -27,12 +27,12 @@
|
||||
|
||||
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
|
||||
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
|
||||
<link rel="stylesheet" href="/static/style.css?v=1.24.76">
|
||||
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.76">
|
||||
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.76">
|
||||
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.76">
|
||||
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.76">
|
||||
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.76">
|
||||
<link rel="stylesheet" href="/static/style.css?v=1.24.77">
|
||||
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.77">
|
||||
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.77">
|
||||
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.77">
|
||||
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.77">
|
||||
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.77">
|
||||
|
||||
|
||||
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
|
||||
@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) {
|
||||
</script>
|
||||
|
||||
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
|
||||
<script src="/static/loader.js?v=1.24.76"></script>
|
||||
<script src="/static/loader.js?v=1.24.77"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
// -- Get voices ---------------------------------------------------------------
|
||||
|
||||
(function (root) {
|
||||
const DEFAULT_VOICE_SOURCE_URLS = [
|
||||
'https://aiartes.com/voiceai',
|
||||
'https://sample-files.com/downloads/audio/wav/voice-sample.wav',
|
||||
@ -297,3 +299,20 @@ $('getvoices-list')?.addEventListener('click', async e => {
|
||||
toast('Source URL copied', 'success');
|
||||
});
|
||||
|
||||
Object.assign(root, {
|
||||
DEFAULT_VOICE_SOURCE_URLS, VOICE_SOURCE_STORAGE_KEY, _voiceSourcePayload, _voiceSourceItems,
|
||||
sourceTextareaValueFromDefaults, initGetVoiceSourcesEditor, getEditableVoiceSourceUrls,
|
||||
getVoiceSourceItems, voiceSourceSearchText, setOptions, renderGetVoices, loadGetVoices,
|
||||
SOURCE_LANGUAGE_CODES, sourceLanguageCode, sourceGenderCode, suggestedVoiceIdFromSourceName,
|
||||
setLibAddSourcePreview, getSourceVoiceInLibrary,
|
||||
});
|
||||
root.TTVC = root.TTVC || {};
|
||||
root.TTVC.voiceSources = root.TTVC.voiceSources || {};
|
||||
Object.assign(root.TTVC.voiceSources, {
|
||||
list: getVoiceSourceItems,
|
||||
load: loadGetVoices,
|
||||
import: getSourceVoiceInLibrary,
|
||||
sourceLanguageCode,
|
||||
sourceGenderCode,
|
||||
});
|
||||
})(window);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user