Spaces:
Running
Running
Update index.html
Browse files- index.html +306 -20
index.html
CHANGED
|
@@ -1,29 +1,315 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
-
<link rel="stylesheet" href="style.css" />
|
| 7 |
-
|
| 8 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 9 |
-
<title>
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>ATOM - Armenian Transcription</title>
|
| 7 |
+
<style>
|
| 8 |
+
* {
|
| 9 |
+
box-sizing: border-box;
|
| 10 |
+
padding: 0;
|
| 11 |
+
margin: 0;
|
| 12 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body {
|
| 16 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 17 |
+
min-height: 100vh;
|
| 18 |
+
display: flex;
|
| 19 |
+
flex-direction: column;
|
| 20 |
+
align-items: center;
|
| 21 |
+
padding: 2rem;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
h1 {
|
| 25 |
+
color: white;
|
| 26 |
+
margin-bottom: 0.5rem;
|
| 27 |
+
font-size: 2.5rem;
|
| 28 |
+
text-align: center;
|
| 29 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.subtitle {
|
| 33 |
+
color: rgba(255, 255, 255, 0.9);
|
| 34 |
+
margin-bottom: 2rem;
|
| 35 |
+
text-align: center;
|
| 36 |
+
font-size: 1.1rem;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.container {
|
| 40 |
+
background: white;
|
| 41 |
+
border-radius: 20px;
|
| 42 |
+
padding: 2rem;
|
| 43 |
+
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
| 44 |
+
max-width: 900px;
|
| 45 |
+
width: 100%;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
#status {
|
| 49 |
+
padding: 1rem;
|
| 50 |
+
background: #f0f4f8;
|
| 51 |
+
border-radius: 10px;
|
| 52 |
+
margin-bottom: 1.5rem;
|
| 53 |
+
text-align: center;
|
| 54 |
+
font-weight: 500;
|
| 55 |
+
color: #4a5568;
|
| 56 |
+
transition: all 0.3s ease;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
#status.loading { background: #fef3c7; color: #92400e; }
|
| 60 |
+
#status.ready { background: #d1fae5; color: #065f46; }
|
| 61 |
+
#status.recording { background: #fecaca; color: #991b1b; animation: pulse 2s infinite; }
|
| 62 |
+
#status.processing { background: #dbeafe; color: #1e40af; }
|
| 63 |
+
#status.error { background: #fee2e2; color: #991b1b; }
|
| 64 |
+
|
| 65 |
+
@keyframes pulse {
|
| 66 |
+
0%, 100% { opacity: 1; }
|
| 67 |
+
50% { opacity: 0.7; }
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.info-box {
|
| 71 |
+
background: #eff6ff;
|
| 72 |
+
border-left: 4px solid #3b82f6;
|
| 73 |
+
padding: 1rem;
|
| 74 |
+
border-radius: 8px;
|
| 75 |
+
margin-bottom: 1.5rem;
|
| 76 |
+
font-size: 0.9rem;
|
| 77 |
+
color: #1e40af;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.stats {
|
| 81 |
+
display: flex;
|
| 82 |
+
gap: 1rem;
|
| 83 |
+
justify-content: space-around;
|
| 84 |
+
padding: 1rem;
|
| 85 |
+
background: #f9fafb;
|
| 86 |
+
border-radius: 8px;
|
| 87 |
+
margin-bottom: 1.5rem;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.stat-item { text-align: center; }
|
| 91 |
+
.stat-value { font-size: 1.5rem; font-weight: 700; color: #667eea; }
|
| 92 |
+
.stat-label { font-size: 0.85rem; color: #6b7280; margin-top: 0.25rem; }
|
| 93 |
+
|
| 94 |
+
.audio-visualizer {
|
| 95 |
+
height: 80px;
|
| 96 |
+
background: #1f2937;
|
| 97 |
+
border-radius: 8px;
|
| 98 |
+
margin-bottom: 1.5rem;
|
| 99 |
+
display: flex;
|
| 100 |
+
align-items: center;
|
| 101 |
+
justify-content: center;
|
| 102 |
+
gap: 4px;
|
| 103 |
+
padding: 1rem;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.bar {
|
| 107 |
+
width: 6px;
|
| 108 |
+
background: linear-gradient(to top, #10b981, #34d399);
|
| 109 |
+
border-radius: 3px;
|
| 110 |
+
transition: height 0.1s ease;
|
| 111 |
+
min-height: 4px;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.settings {
|
| 115 |
+
display: flex;
|
| 116 |
+
gap: 1.5rem;
|
| 117 |
+
margin-bottom: 1.5rem;
|
| 118 |
+
flex-wrap: wrap;
|
| 119 |
+
padding: 1rem;
|
| 120 |
+
background: #f9fafb;
|
| 121 |
+
border-radius: 8px;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.setting-group {
|
| 125 |
+
display: flex;
|
| 126 |
+
flex-direction: column;
|
| 127 |
+
gap: 0.5rem;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.setting-group label {
|
| 131 |
+
font-size: 0.9rem;
|
| 132 |
+
font-weight: 500;
|
| 133 |
+
color: #4b5563;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
select {
|
| 137 |
+
padding: 0.5rem;
|
| 138 |
+
border: 2px solid #e5e7eb;
|
| 139 |
+
border-radius: 6px;
|
| 140 |
+
font-size: 0.9rem;
|
| 141 |
+
background: white;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.controls {
|
| 145 |
+
display: flex;
|
| 146 |
+
gap: 1rem;
|
| 147 |
+
justify-content: center;
|
| 148 |
+
margin-bottom: 2rem;
|
| 149 |
+
flex-wrap: wrap;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
button {
|
| 153 |
+
padding: 1rem 2rem;
|
| 154 |
+
font-size: 1rem;
|
| 155 |
+
font-weight: 600;
|
| 156 |
+
border: none;
|
| 157 |
+
border-radius: 10px;
|
| 158 |
+
cursor: pointer;
|
| 159 |
+
transition: all 0.3s ease;
|
| 160 |
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
| 161 |
+
}
|
| 162 |
|
| 163 |
+
button:disabled { opacity: 0.5; cursor: not-allowed; }
|
| 164 |
+
|
| 165 |
+
#startBtn { background: #10b981; color: white; }
|
| 166 |
+
#startBtn:hover:not(:disabled) {
|
| 167 |
+
background: #059669;
|
| 168 |
+
transform: translateY(-2px);
|
| 169 |
+
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
#stopBtn { background: #ef4444; color: white; }
|
| 173 |
+
#stopBtn:hover:not(:disabled) {
|
| 174 |
+
background: #dc2626;
|
| 175 |
+
transform: translateY(-2px);
|
| 176 |
+
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
#clearBtn { background: #6b7280; color: white; }
|
| 180 |
+
#clearBtn:hover:not(:disabled) { background: #4b5563; }
|
| 181 |
+
|
| 182 |
+
.transcription-container {
|
| 183 |
+
background: #f9fafb;
|
| 184 |
+
border: 2px solid #e5e7eb;
|
| 185 |
+
border-radius: 10px;
|
| 186 |
+
padding: 1.5rem;
|
| 187 |
+
min-height: 300px;
|
| 188 |
+
max-height: 500px;
|
| 189 |
+
overflow-y: auto;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.transcription-item {
|
| 193 |
+
margin-bottom: 1rem;
|
| 194 |
+
padding: 1rem;
|
| 195 |
+
background: white;
|
| 196 |
+
border-radius: 8px;
|
| 197 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
| 198 |
+
animation: slideIn 0.3s ease;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
@keyframes slideIn {
|
| 202 |
+
from { opacity: 0; transform: translateY(-10px); }
|
| 203 |
+
to { opacity: 1; transform: translateY(0); }
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
.timestamp {
|
| 207 |
+
font-size: 0.85rem;
|
| 208 |
+
color: #6b7280;
|
| 209 |
+
margin-bottom: 0.5rem;
|
| 210 |
+
font-family: monospace;
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
.text {
|
| 214 |
+
color: #1f2937;
|
| 215 |
+
line-height: 1.6;
|
| 216 |
+
font-size: 1.1rem;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.empty-state {
|
| 220 |
+
text-align: center;
|
| 221 |
+
color: #9ca3af;
|
| 222 |
+
padding: 3rem;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
.empty-state svg {
|
| 226 |
+
width: 64px;
|
| 227 |
+
height: 64px;
|
| 228 |
+
margin-bottom: 1rem;
|
| 229 |
+
opacity: 0.5;
|
| 230 |
+
}
|
| 231 |
+
</style>
|
| 232 |
+
</head>
|
| 233 |
<body>
|
| 234 |
+
<h1>🎤 ATOM - Armenian Transcription</h1>
|
| 235 |
+
<p class="subtitle">Real-time Armenian speech recognition with WebGPU</p>
|
| 236 |
+
|
| 237 |
+
<div class="container">
|
| 238 |
+
<div id="status" class="loading">Loading ATOM model...</div>
|
| 239 |
+
|
| 240 |
+
<div class="info-box">
|
| 241 |
+
<strong>Armenian-only model:</strong> This custom ATOM model is trained specifically for Armenian speech recognition.
|
| 242 |
+
WebGPU acceleration recommended (Chrome/Edge 113+).
|
| 243 |
+
</div>
|
| 244 |
+
|
| 245 |
+
<div class="stats">
|
| 246 |
+
<div class="stat-item">
|
| 247 |
+
<div class="stat-value" id="chunkCount">0</div>
|
| 248 |
+
<div class="stat-label">Chunks Processed</div>
|
| 249 |
+
</div>
|
| 250 |
+
<div class="stat-item">
|
| 251 |
+
<div class="stat-value" id="recordingTime">00:00</div>
|
| 252 |
+
<div class="stat-label">Recording Time</div>
|
| 253 |
+
</div>
|
| 254 |
+
</div>
|
| 255 |
|
| 256 |
+
<div class="settings">
|
| 257 |
+
<div class="setting-group">
|
| 258 |
+
<label for="chunkLength">Chunk Duration:</label>
|
| 259 |
+
<select id="chunkLength">
|
| 260 |
+
<option value="3">3 seconds</option>
|
| 261 |
+
<option value="5" selected>5 seconds</option>
|
| 262 |
+
<option value="8">8 seconds</option>
|
| 263 |
+
<option value="10">10 seconds</option>
|
| 264 |
+
</select>
|
| 265 |
+
</div>
|
| 266 |
+
<div class="setting-group">
|
| 267 |
+
<label>
|
| 268 |
+
<input type="checkbox" id="useWebGPU" checked>
|
| 269 |
+
Use WebGPU Acceleration
|
| 270 |
+
</label>
|
| 271 |
+
</div>
|
| 272 |
+
</div>
|
| 273 |
+
|
| 274 |
+
<div class="audio-visualizer" id="visualizer">
|
| 275 |
+
<div class="bar"></div>
|
| 276 |
+
<div class="bar"></div>
|
| 277 |
+
<div class="bar"></div>
|
| 278 |
+
<div class="bar"></div>
|
| 279 |
+
<div class="bar"></div>
|
| 280 |
+
<div class="bar"></div>
|
| 281 |
+
<div class="bar"></div>
|
| 282 |
+
<div class="bar"></div>
|
| 283 |
+
<div class="bar"></div>
|
| 284 |
+
<div class="bar"></div>
|
| 285 |
+
<div class="bar"></div>
|
| 286 |
+
<div class="bar"></div>
|
| 287 |
+
<div class="bar"></div>
|
| 288 |
+
<div class="bar"></div>
|
| 289 |
+
<div class="bar"></div>
|
| 290 |
+
<div class="bar"></div>
|
| 291 |
+
<div class="bar"></div>
|
| 292 |
+
<div class="bar"></div>
|
| 293 |
+
<div class="bar"></div>
|
| 294 |
+
<div class="bar"></div>
|
| 295 |
+
</div>
|
| 296 |
+
|
| 297 |
+
<div class="controls">
|
| 298 |
+
<button id="startBtn">🎙️ Start Recording</button>
|
| 299 |
+
<button id="stopBtn" disabled>⏹️ Stop Recording</button>
|
| 300 |
+
<button id="clearBtn">🗑️ Clear</button>
|
| 301 |
+
</div>
|
| 302 |
+
|
| 303 |
+
<div class="transcription-container" id="transcriptionContainer">
|
| 304 |
+
<div class="empty-state">
|
| 305 |
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 306 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z" />
|
| 307 |
+
</svg>
|
| 308 |
+
<p>Click "Start Recording" to begin transcribing Armenian speech</p>
|
| 309 |
+
</div>
|
| 310 |
+
</div>
|
| 311 |
+
</div>
|
| 312 |
+
|
| 313 |
+
<script type="module" src="index.js"></script>
|
| 314 |
+
</body>
|
| 315 |
</html>
|