Spaces:
Running
Running
Commit ·
dcef6f0
1
Parent(s): 9619737
Your Voices first in library, consent checkbox for uploads
Browse files- index.html +14 -4
index.html
CHANGED
|
@@ -913,11 +913,11 @@ pre {
|
|
| 913 |
<div class="page-desc">Preset speakers and your custom cloned voices. Select one to use in Voice Clone.</div>
|
| 914 |
</div>
|
| 915 |
|
| 916 |
-
<div class="preset-section-title">Preset Speakers</div>
|
| 917 |
-
<div class="voices-grid" id="presets-grid" style="margin-bottom:28px"></div>
|
| 918 |
-
|
| 919 |
<div class="preset-section-title">Your Voices</div>
|
| 920 |
<div class="voices-grid" id="voices-grid"></div>
|
|
|
|
|
|
|
|
|
|
| 921 |
</div>
|
| 922 |
|
| 923 |
<!-- History Page -->
|
|
@@ -1054,6 +1054,10 @@ result = client.<span class="f">predict</span>(
|
|
| 1054 |
<input type="file" id="modal-file-input" accept="audio/*">
|
| 1055 |
</div>
|
| 1056 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1057 |
<div class="modal-actions">
|
| 1058 |
<button class="btn-modal btn-cancel" onclick="closeModal()">Cancel</button>
|
| 1059 |
<button class="btn-modal btn-save" id="save-voice-btn" onclick="saveVoice()" disabled>Save Voice</button>
|
|
@@ -1304,6 +1308,7 @@ window.openAddVoice = function() {
|
|
| 1304 |
document.getElementById("modal-upload-label").innerHTML = 'Drop audio file here or click to browse<div class="upload-area-sub">MP3, WAV, FLAC · 5-30 seconds recommended</div>';
|
| 1305 |
document.getElementById("modal-upload").classList.remove("has-file");
|
| 1306 |
document.getElementById("save-voice-btn").disabled = true;
|
|
|
|
| 1307 |
modalFileData = null;
|
| 1308 |
};
|
| 1309 |
|
|
@@ -1330,8 +1335,13 @@ function handleModalFile(file) {
|
|
| 1330 |
}
|
| 1331 |
|
| 1332 |
document.getElementById("voice-name-input").addEventListener("input", checkModalSave);
|
|
|
|
| 1333 |
function checkModalSave() {
|
| 1334 |
-
document.getElementById("save-voice-btn").disabled = !(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1335 |
}
|
| 1336 |
|
| 1337 |
window.saveVoice = async function() {
|
|
|
|
| 913 |
<div class="page-desc">Preset speakers and your custom cloned voices. Select one to use in Voice Clone.</div>
|
| 914 |
</div>
|
| 915 |
|
|
|
|
|
|
|
|
|
|
| 916 |
<div class="preset-section-title">Your Voices</div>
|
| 917 |
<div class="voices-grid" id="voices-grid"></div>
|
| 918 |
+
|
| 919 |
+
<div class="preset-section-title" style="margin-top:28px">Preset Speakers</div>
|
| 920 |
+
<div class="voices-grid" id="presets-grid"></div>
|
| 921 |
</div>
|
| 922 |
|
| 923 |
<!-- History Page -->
|
|
|
|
| 1054 |
<input type="file" id="modal-file-input" accept="audio/*">
|
| 1055 |
</div>
|
| 1056 |
</div>
|
| 1057 |
+
<label style="display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-muted);cursor:pointer;margin-bottom:4px;line-height:1.4">
|
| 1058 |
+
<input type="checkbox" id="voice-consent" style="margin-top:2px;accent-color:var(--accent)">
|
| 1059 |
+
I confirm I have the right to use this voice and consent to cloning it.
|
| 1060 |
+
</label>
|
| 1061 |
<div class="modal-actions">
|
| 1062 |
<button class="btn-modal btn-cancel" onclick="closeModal()">Cancel</button>
|
| 1063 |
<button class="btn-modal btn-save" id="save-voice-btn" onclick="saveVoice()" disabled>Save Voice</button>
|
|
|
|
| 1308 |
document.getElementById("modal-upload-label").innerHTML = 'Drop audio file here or click to browse<div class="upload-area-sub">MP3, WAV, FLAC · 5-30 seconds recommended</div>';
|
| 1309 |
document.getElementById("modal-upload").classList.remove("has-file");
|
| 1310 |
document.getElementById("save-voice-btn").disabled = true;
|
| 1311 |
+
document.getElementById("voice-consent").checked = false;
|
| 1312 |
modalFileData = null;
|
| 1313 |
};
|
| 1314 |
|
|
|
|
| 1335 |
}
|
| 1336 |
|
| 1337 |
document.getElementById("voice-name-input").addEventListener("input", checkModalSave);
|
| 1338 |
+
document.getElementById("voice-consent").addEventListener("change", checkModalSave);
|
| 1339 |
function checkModalSave() {
|
| 1340 |
+
document.getElementById("save-voice-btn").disabled = !(
|
| 1341 |
+
document.getElementById("voice-name-input").value.trim() &&
|
| 1342 |
+
modalFileData &&
|
| 1343 |
+
document.getElementById("voice-consent").checked
|
| 1344 |
+
);
|
| 1345 |
}
|
| 1346 |
|
| 1347 |
window.saveVoice = async function() {
|