Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +87 -21
index.html
CHANGED
|
@@ -1,29 +1,95 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
-
<meta charset="UTF-8"
|
| 6 |
-
<
|
| 7 |
-
|
| 8 |
-
<
|
| 9 |
-
<
|
|
|
|
|
|
|
|
|
|
| 10 |
</head>
|
| 11 |
-
|
| 12 |
<body>
|
| 13 |
-
<
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
<label id="status">Loading model...</label>
|
| 24 |
-
<input id="upload" type="file" accept="image/*" />
|
| 25 |
|
| 26 |
-
|
| 27 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Supertonic TTS - Text to Speech</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script type="module">
|
| 9 |
+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.0';
|
| 10 |
+
window.pipeline = pipeline;
|
| 11 |
+
</script>
|
| 12 |
</head>
|
|
|
|
| 13 |
<body>
|
| 14 |
+
<div class="container">
|
| 15 |
+
<header>
|
| 16 |
+
<div class="header-content">
|
| 17 |
+
<h1>🎙️ Supertonic TTS</h1>
|
| 18 |
+
<p>Transform text to natural speech using cutting-edge AI</p>
|
| 19 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-badge" aria-label="Built with anycoder">
|
| 20 |
+
Built with anycoder
|
| 21 |
+
</a>
|
| 22 |
+
</div>
|
| 23 |
+
</header>
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
<main class="main-content">
|
| 26 |
+
<div class="controls">
|
| 27 |
+
<div class="input-section">
|
| 28 |
+
<label for="textInput" class="sr-only">Enter text to convert to speech</label>
|
| 29 |
+
<textarea
|
| 30 |
+
id="textInput"
|
| 31 |
+
placeholder="Type your text here... (e.g., 'Hello, this is a test of the Supertonic TTS system!')"
|
| 32 |
+
rows="4"
|
| 33 |
+
maxlength="500"
|
| 34 |
+
></textarea>
|
| 35 |
+
<div class="input-info">
|
| 36 |
+
<span id="charCount">0/500</span>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
<div class="voice-section">
|
| 41 |
+
<label for="voiceSelect" class="voice-label">Voice:</label>
|
| 42 |
+
<select id="voiceSelect">
|
| 43 |
+
<option value="F1">Female 1</option>
|
| 44 |
+
<option value="F2">Female 2</option>
|
| 45 |
+
<option value="M1">Male 1</option>
|
| 46 |
+
<option value="M2">Male 2</option>
|
| 47 |
+
</select>
|
| 48 |
+
</div>
|
| 49 |
|
| 50 |
+
<div class="device-section">
|
| 51 |
+
<label class="device-toggle-label">
|
| 52 |
+
<input type="checkbox" id="deviceToggle" />
|
| 53 |
+
<span class="toggle-switch">
|
| 54 |
+
<span class="toggle-knob"></span>
|
| 55 |
+
</span>
|
| 56 |
+
<span class="toggle-text">
|
| 57 |
+
<span id="deviceText">CPU Mode</span>
|
| 58 |
+
</span>
|
| 59 |
+
</label>
|
| 60 |
+
</div>
|
| 61 |
+
|
| 62 |
+
<button id="generateBtn" class="generate-btn" disabled>
|
| 63 |
+
<span class="btn-content">
|
| 64 |
+
<span class="btn-text">Generate Speech</span>
|
| 65 |
+
<div class="spinner" style="display: none;"></div>
|
| 66 |
+
</span>
|
| 67 |
+
</button>
|
| 68 |
+
</div>
|
| 69 |
+
|
| 70 |
+
<div id="status" class="status hidden"></div>
|
| 71 |
+
|
| 72 |
+
<div id="audioSection" class="audio-section hidden">
|
| 73 |
+
<div class="audio-controls">
|
| 74 |
+
<button id="playBtn" class="play-btn" aria-label="Play audio">
|
| 75 |
+
<svg viewBox="0 0 24 24" fill="currentColor">
|
| 76 |
+
<path d="M8 5v14l11-7z"/>
|
| 77 |
+
</svg>
|
| 78 |
+
</button>
|
| 79 |
+
<button id="downloadBtn" class="download-btn" aria-label="Download audio" disabled>
|
| 80 |
+
<svg viewBox="0 0 24 24" fill="currentColor">
|
| 81 |
+
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>
|
| 82 |
+
</svg>
|
| 83 |
+
</button>
|
| 84 |
+
<button id="regenerateBtn" class="regenerate-btn" aria-label="Generate new audio">
|
| 85 |
+
🔄 New Audio
|
| 86 |
+
</button>
|
| 87 |
+
</div>
|
| 88 |
+
<audio id="audioPlayer" preload="metadata"></audio>
|
| 89 |
+
</div>
|
| 90 |
+
</main>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<script type="module" src="index.js"></script>
|
| 94 |
+
</body>
|
| 95 |
</html>
|