apolinario commited on
Commit
66a3cea
·
1 Parent(s): e0cb8bc

Rename Voice Isolator -> Voice Cleaner; promote denoise/enhance toggle out of advanced

Browse files
Files changed (1) hide show
  1. index.html +23 -16
index.html CHANGED
@@ -840,7 +840,7 @@ pre {
840
  </button>
841
  <button class="nav-item" data-page="isolate" onclick="showPage('isolate', this)">
842
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="8" x2="12" y2="16"/><line x1="9" y1="10" x2="9" y2="14"/><line x1="15" y1="10" x2="15" y2="14"/><path d="M6 6c-3 3-3 9 0 12"/><path d="M18 6c3 3 3 9 0 12"/></svg>
843
- Voice Isolator
844
  </button>
845
  <button class="nav-item" data-page="sfx" onclick="showPage('sfx', this)">
846
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 C 12 8 13 11 21 12 C 13 13 12 16 12 21 C 12 16 11 13 3 12 C 11 11 12 8 12 3 Z"/></svg>
@@ -1128,11 +1128,11 @@ pre {
1128
  </div>
1129
  </div>
1130
 
1131
- <!-- Voice Isolator Page -->
1132
  <div class="page" id="page-isolate">
1133
  <div class="page-header">
1134
- <div class="page-title">Voice Isolator</div>
1135
- <div class="page-desc">Clean and enhance noisy audio. Powered by Resemble Enhance.</div>
1136
  <button class="page-api-toggle" type="button" onclick="togglePageApi('isolate', this)">
1137
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
1138
  <span class="page-api-label">View API</span>
@@ -1144,6 +1144,11 @@ pre {
1144
  <input type="file" id="iso-file-input" accept="audio/*">
1145
  </div>
1146
 
 
 
 
 
 
1147
  <div class="settings-accordion">
1148
  <button class="settings-toggle" onclick="this.classList.toggle('open');this.nextElementSibling.classList.toggle('open')">
1149
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
@@ -1166,16 +1171,12 @@ pre {
1166
  </div>
1167
  </div>
1168
  </div>
1169
- <label style="display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text);cursor:pointer;margin-top:12px">
1170
- <input type="checkbox" id="iso-denoise-only" style="accent-color:var(--accent)">
1171
- Denoise only (skip enhancement)
1172
- </label>
1173
  </div>
1174
  </div>
1175
 
1176
  <div class="generate-bar">
1177
  <button class="btn-generate" id="iso-btn" onclick="voiceIsolate()" disabled>
1178
- <span class="btn-text">Enhance Audio</span>
1179
  <div class="spinner"></div>
1180
  </button>
1181
  </div>
@@ -1366,7 +1367,7 @@ pre {
1366
  <option value="synthesis">Voice Clone — OmniVoice</option>
1367
  <option value="design">Voice Design — Qwen3-TTS</option>
1368
  <option value="changer">Voice Changer — Seed-VC</option>
1369
- <option value="isolate">Voice Isolator — Resemble Enhance</option>
1370
  <option value="sfx">Sound Effects — Stable Audio 3</option>
1371
  <option value="transcribe">Transcribe — Cohere</option>
1372
  </select>
@@ -2564,7 +2565,7 @@ curl -N "$BASE/queue/data?session_hash=$SESSION" \\
2564
  },
2565
 
2566
  isolate: {
2567
- javascript: `// Voice Isolator — multimodalart/resemble-enhance-zerogpu
2568
  const TOKEN = process.env.HF_TOKEN;
2569
  const BASE = "https://multimodalart-resemble-enhance-zerogpu.hf.space/gradio_api";
2570
  const SESSION = crypto.randomUUID();
@@ -2591,7 +2592,7 @@ await fetch(\`\${BASE}/queue/join\`, {
2591
  // data[0] = denoised, data[1] = enhanced
2592
  const r = await fetch(\`\${BASE}/queue/data?session_hash=\${SESSION}\`,
2593
  { headers: { Authorization: \`Bearer \${TOKEN}\` } });`,
2594
- python: `# Voice Isolator — multimodalart/resemble-enhance-zerogpu
2595
  from gradio_client import Client, handle_file
2596
 
2597
  client = Client("multimodalart/resemble-enhance-zerogpu")
@@ -2604,7 +2605,7 @@ denoised, enhanced = client.predict(
2604
  api_name="/predict",
2605
  )
2606
  print(enhanced)`,
2607
- curl: `# Voice Isolator — multimodalart/resemble-enhance-zerogpu
2608
  export HF_TOKEN=hf_xxx
2609
  BASE=https://multimodalart-resemble-enhance-zerogpu.hf.space/gradio_api
2610
 
@@ -2797,7 +2798,7 @@ window.showInlineApiLang = function(lang, btn) {
2797
  renderApiCode();
2798
  };
2799
 
2800
- // ── Shared gradio helpers (for Voice Changer / Isolator / SFX) ──
2801
 
2802
  const SEED_VC_BASE = "https://plachta-seed-vc.hf.space/gradio_api";
2803
  const RESEMBLE_BASE = "https://multimodalart-resemble-enhance-zerogpu.hf.space/gradio_api";
@@ -3192,7 +3193,13 @@ window.voiceChange = async function() {
3192
  }
3193
  };
3194
 
3195
- // ── Voice Isolator (Resemble Enhance) ──
 
 
 
 
 
 
3196
 
3197
  let isoFile = null;
3198
  const isoNfe = document.getElementById("iso-nfe");
@@ -3218,7 +3225,7 @@ window.voiceIsolate = async function() {
3218
  const progressBar = document.getElementById("iso-progress-bar");
3219
  const progressFill = document.getElementById("iso-progress-fill");
3220
  const result = document.getElementById("iso-result");
3221
- const denoiseOnly = document.getElementById("iso-denoise-only").checked;
3222
 
3223
  btn.disabled = true; btn.classList.add("loading");
3224
  result.classList.remove("visible");
 
840
  </button>
841
  <button class="nav-item" data-page="isolate" onclick="showPage('isolate', this)">
842
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="8" x2="12" y2="16"/><line x1="9" y1="10" x2="9" y2="14"/><line x1="15" y1="10" x2="15" y2="14"/><path d="M6 6c-3 3-3 9 0 12"/><path d="M18 6c3 3 3 9 0 12"/></svg>
843
+ Voice Cleaner
844
  </button>
845
  <button class="nav-item" data-page="sfx" onclick="showPage('sfx', this)">
846
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 C 12 8 13 11 21 12 C 13 13 12 16 12 21 C 12 16 11 13 3 12 C 11 11 12 8 12 3 Z"/></svg>
 
1128
  </div>
1129
  </div>
1130
 
1131
+ <!-- Voice Cleaner Page -->
1132
  <div class="page" id="page-isolate">
1133
  <div class="page-header">
1134
+ <div class="page-title">Voice Cleaner</div>
1135
+ <div class="page-desc">Strip background noise from speech and optionally restore clarity. Powered by Resemble Enhance.</div>
1136
  <button class="page-api-toggle" type="button" onclick="togglePageApi('isolate', this)">
1137
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
1138
  <span class="page-api-label">View API</span>
 
1144
  <input type="file" id="iso-file-input" accept="audio/*">
1145
  </div>
1146
 
1147
+ <div class="audio-source-tabs" style="margin-bottom:16px" id="iso-mode-tabs">
1148
+ <button class="audio-source-tab active" data-iso-mode="enhance" type="button" onclick="setIsoMode('enhance')">Denoise &amp; Enhance</button>
1149
+ <button class="audio-source-tab" data-iso-mode="denoise" type="button" onclick="setIsoMode('denoise')">Denoise only</button>
1150
+ </div>
1151
+
1152
  <div class="settings-accordion">
1153
  <button class="settings-toggle" onclick="this.classList.toggle('open');this.nextElementSibling.classList.toggle('open')">
1154
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
 
1171
  </div>
1172
  </div>
1173
  </div>
 
 
 
 
1174
  </div>
1175
  </div>
1176
 
1177
  <div class="generate-bar">
1178
  <button class="btn-generate" id="iso-btn" onclick="voiceIsolate()" disabled>
1179
+ <span class="btn-text">Clean Audio</span>
1180
  <div class="spinner"></div>
1181
  </button>
1182
  </div>
 
1367
  <option value="synthesis">Voice Clone — OmniVoice</option>
1368
  <option value="design">Voice Design — Qwen3-TTS</option>
1369
  <option value="changer">Voice Changer — Seed-VC</option>
1370
+ <option value="isolate">Voice Cleaner — Resemble Enhance</option>
1371
  <option value="sfx">Sound Effects — Stable Audio 3</option>
1372
  <option value="transcribe">Transcribe — Cohere</option>
1373
  </select>
 
2565
  },
2566
 
2567
  isolate: {
2568
+ javascript: `// Voice Cleaner — multimodalart/resemble-enhance-zerogpu
2569
  const TOKEN = process.env.HF_TOKEN;
2570
  const BASE = "https://multimodalart-resemble-enhance-zerogpu.hf.space/gradio_api";
2571
  const SESSION = crypto.randomUUID();
 
2592
  // data[0] = denoised, data[1] = enhanced
2593
  const r = await fetch(\`\${BASE}/queue/data?session_hash=\${SESSION}\`,
2594
  { headers: { Authorization: \`Bearer \${TOKEN}\` } });`,
2595
+ python: `# Voice Cleaner — multimodalart/resemble-enhance-zerogpu
2596
  from gradio_client import Client, handle_file
2597
 
2598
  client = Client("multimodalart/resemble-enhance-zerogpu")
 
2605
  api_name="/predict",
2606
  )
2607
  print(enhanced)`,
2608
+ curl: `# Voice Cleaner — multimodalart/resemble-enhance-zerogpu
2609
  export HF_TOKEN=hf_xxx
2610
  BASE=https://multimodalart-resemble-enhance-zerogpu.hf.space/gradio_api
2611
 
 
2798
  renderApiCode();
2799
  };
2800
 
2801
+ // ── Shared gradio helpers (for Voice Changer / Cleaner / SFX) ──
2802
 
2803
  const SEED_VC_BASE = "https://plachta-seed-vc.hf.space/gradio_api";
2804
  const RESEMBLE_BASE = "https://multimodalart-resemble-enhance-zerogpu.hf.space/gradio_api";
 
3193
  }
3194
  };
3195
 
3196
+ // ── Voice Cleaner (Resemble Enhance) ──
3197
+
3198
+ let isoMode = "enhance"; // "enhance" = denoise+enhance, "denoise" = denoise-only
3199
+ window.setIsoMode = function(mode) {
3200
+ isoMode = mode;
3201
+ document.querySelectorAll("#iso-mode-tabs .audio-source-tab").forEach(t => t.classList.toggle("active", t.dataset.isoMode === mode));
3202
+ };
3203
 
3204
  let isoFile = null;
3205
  const isoNfe = document.getElementById("iso-nfe");
 
3225
  const progressBar = document.getElementById("iso-progress-bar");
3226
  const progressFill = document.getElementById("iso-progress-fill");
3227
  const result = document.getElementById("iso-result");
3228
+ const denoiseOnly = isoMode === "denoise";
3229
 
3230
  btn.disabled = true; btn.classList.add("loading");
3231
  result.classList.remove("visible");