Spaces:
Running
Running
undefined - Initial Deployment
Browse files- index.html +382 -306
index.html
CHANGED
|
@@ -3,29 +3,20 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
-
<!--
|
| 10 |
-
<link href='https://cdn.jsdelivr.net/npm/fullcalendar@5.11.3/main.min.css' rel='stylesheet' />
|
| 11 |
-
<script src='https://cdn.jsdelivr.net/npm/fullcalendar@5.11.3/main.min.js'></script>
|
| 12 |
-
<!-- Wavesurfer.js -->
|
| 13 |
<script src="https://unpkg.com/wavesurfer.js@6.6.3"></script>
|
| 14 |
-
<!--
|
| 15 |
-
<
|
|
|
|
|
|
|
|
|
|
| 16 |
<style>
|
| 17 |
-
/* Custom styles */
|
| 18 |
.sidebar {
|
| 19 |
transition: all 0.3s ease;
|
| 20 |
}
|
| 21 |
-
.recording-pulse {
|
| 22 |
-
animation: pulse 2s infinite;
|
| 23 |
-
}
|
| 24 |
-
@keyframes pulse {
|
| 25 |
-
0% { opacity: 1; }
|
| 26 |
-
50% { opacity: 0.5; }
|
| 27 |
-
100% { opacity: 1; }
|
| 28 |
-
}
|
| 29 |
.waveform-container {
|
| 30 |
background: linear-gradient(90deg, #03045e, #accd5a, #fb5607);
|
| 31 |
background-size: 400% 400%;
|
|
@@ -36,29 +27,38 @@
|
|
| 36 |
50% { background-position: 100% 50%; }
|
| 37 |
100% { background-position: 0% 50%; }
|
| 38 |
}
|
| 39 |
-
.
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
}
|
| 42 |
-
.
|
| 43 |
-
|
|
|
|
| 44 |
}
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
| 47 |
}
|
| 48 |
-
.
|
| 49 |
-
|
| 50 |
-
cursor: pointer;
|
| 51 |
}
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
-
.
|
| 56 |
-
background-color:
|
| 57 |
-
|
| 58 |
}
|
| 59 |
</style>
|
| 60 |
</head>
|
| 61 |
-
<body class="bg-gray-50
|
| 62 |
<div class="flex h-screen overflow-hidden">
|
| 63 |
<!-- Sidebar -->
|
| 64 |
<div class="sidebar bg-indigo-800 text-white w-64 flex flex-col">
|
|
@@ -82,7 +82,7 @@
|
|
| 82 |
<i class="fas fa-users"></i>
|
| 83 |
<span>Participants</span>
|
| 84 |
</a>
|
| 85 |
-
<a href="interviews.html" class="flex items-center space-x-3 p-2 rounded-lg bg-indigo-700 text-white">
|
| 86 |
<i class="fas fa-microphone"></i>
|
| 87 |
<span>Interviews</span>
|
| 88 |
</a>
|
|
@@ -98,7 +98,7 @@
|
|
| 98 |
<i class="fas fa-robot"></i>
|
| 99 |
<span>AI Assist</span>
|
| 100 |
</a>
|
| 101 |
-
<a href="transcriber.html" class="flex items-center space-x-3 p-2 rounded-lg
|
| 102 |
<i class="fas fa-keyboard"></i>
|
| 103 |
<span>Transcriber</span>
|
| 104 |
</a>
|
|
@@ -114,345 +114,421 @@
|
|
| 114 |
|
| 115 |
<!-- Main Content Area -->
|
| 116 |
<div class="flex-1 flex flex-col overflow-hidden">
|
| 117 |
-
<!--
|
| 118 |
<header class="bg-white shadow-sm p-4">
|
| 119 |
-
<div class="
|
| 120 |
-
<
|
| 121 |
-
<
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
</button>
|
| 125 |
-
<div class="relative">
|
| 126 |
-
<input type="text" placeholder="Search interviews..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
| 127 |
-
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 128 |
-
</div>
|
| 129 |
-
</div>
|
| 130 |
</div>
|
| 131 |
</header>
|
| 132 |
|
| 133 |
<!-- Main Content -->
|
| 134 |
-
<div class="flex-1 flex overflow-hidden">
|
| 135 |
-
<!--
|
| 136 |
-
<div class="
|
| 137 |
-
<div class="
|
| 138 |
-
<
|
| 139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
|
| 143 |
-
<!--
|
| 144 |
-
<div class="flex-1
|
| 145 |
-
<div class="
|
| 146 |
-
<
|
| 147 |
-
|
| 148 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
<div class="flex justify-between items-center mb-4">
|
| 150 |
-
<h3 class="text-lg font-semibold text-gray-800">
|
| 151 |
-
<div class="flex items-center space-x-
|
| 152 |
-
<select id="
|
| 153 |
-
<option value="">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
</select>
|
| 155 |
-
<span class="text-sm text-gray-500">00:32:45</span>
|
| 156 |
-
<button class="p-2 rounded-full bg-gray-500 text-white">
|
| 157 |
-
<i class="fas fa-microphone"></i>
|
| 158 |
-
</button>
|
| 159 |
</div>
|
| 160 |
</div>
|
| 161 |
|
| 162 |
-
<div class="waveform-container h-
|
| 163 |
|
| 164 |
<div class="flex justify-center space-x-4">
|
| 165 |
-
<button class="p-
|
| 166 |
<i class="fas fa-step-backward text-gray-600"></i>
|
| 167 |
</button>
|
| 168 |
-
<button class="p-
|
| 169 |
-
<i class="fas fa-
|
| 170 |
</button>
|
| 171 |
-
<button class="p-
|
| 172 |
<i class="fas fa-step-forward text-gray-600"></i>
|
| 173 |
</button>
|
| 174 |
</div>
|
| 175 |
|
| 176 |
-
<
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
<div class="flex items-center space-x-2">
|
| 179 |
-
<
|
| 180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
</div>
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
</div>
|
| 186 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
</div>
|
| 188 |
|
| 189 |
-
<!--
|
| 190 |
-
<div class="bg-white rounded-
|
| 191 |
-
<h3 class="text-lg font-semibold text-gray-800 mb-4">
|
| 192 |
-
<div class="
|
| 193 |
-
<
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
</div>
|
| 196 |
</div>
|
| 197 |
-
</div>
|
| 198 |
-
</div>
|
| 199 |
-
</div>
|
| 200 |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
|
|
|
|
|
|
| 211 |
</div>
|
|
|
|
| 212 |
</div>
|
| 213 |
</div>
|
| 214 |
</div>
|
| 215 |
</div>
|
| 216 |
</div>
|
| 217 |
-
|
| 218 |
-
<!-- Metadata Editor (Bottom Drawer) -->
|
| 219 |
-
<div class="metadata-drawer bg-white border-t border-gray-200 p-4">
|
| 220 |
-
<div class="flex justify-between items-center mb-4">
|
| 221 |
-
<h3 class="text-lg font-semibold text-gray-800">Session Metadata</h3>
|
| 222 |
-
<button class="p-2 hover:bg-gray-100 rounded-lg">
|
| 223 |
-
<i class="fas fa-chevron-down text-gray-600"></i>
|
| 224 |
-
</button>
|
| 225 |
-
</div>
|
| 226 |
-
<div class="grid grid-cols-3 gap-4">
|
| 227 |
-
<div>
|
| 228 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Session Type</label>
|
| 229 |
-
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
|
| 230 |
-
<option>In-person</option>
|
| 231 |
-
<option>Remote</option>
|
| 232 |
-
</select>
|
| 233 |
-
</div>
|
| 234 |
-
<div>
|
| 235 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Equipment</label>
|
| 236 |
-
<input type="text" class="w-full border border-gray-300 rounded-lg px-3 py-2" placeholder="Enter equipment used">
|
| 237 |
-
</div>
|
| 238 |
-
<div>
|
| 239 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Classification</label>
|
| 240 |
-
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
|
| 241 |
-
<option>Public</option>
|
| 242 |
-
<option>Confidential</option>
|
| 243 |
-
<option>Restricted</option>
|
| 244 |
-
</select>
|
| 245 |
-
</div>
|
| 246 |
-
</div>
|
| 247 |
-
</div>
|
| 248 |
</div>
|
| 249 |
</div>
|
| 250 |
|
|
|
|
| 251 |
<script>
|
| 252 |
-
// Initialize
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
slotMinTime: '08:00:00',
|
| 263 |
-
slotMaxTime: '20:00:00',
|
| 264 |
-
allDaySlot: false,
|
| 265 |
-
slotDuration: '00:30:00',
|
| 266 |
-
snapDuration: '00:15:00',
|
| 267 |
-
eventOverlap: false,
|
| 268 |
-
eventConstraint: {
|
| 269 |
-
startTime: '08:00',
|
| 270 |
-
endTime: '20:00',
|
| 271 |
-
dows: [1, 2, 3, 4, 5] // Monday to Friday
|
| 272 |
-
},
|
| 273 |
-
eventDidMount: function(info) {
|
| 274 |
-
// Check for conflicts
|
| 275 |
-
const events = calendar.getEvents();
|
| 276 |
-
const hasConflict = events.some(event => {
|
| 277 |
-
if (event.id === info.event.id) return false;
|
| 278 |
-
return (
|
| 279 |
-
(info.event.start < event.end && info.event.end > event.start)
|
| 280 |
-
);
|
| 281 |
-
});
|
| 282 |
-
if (hasConflict) {
|
| 283 |
-
info.el.classList.add('conflict-highlight');
|
| 284 |
-
}
|
| 285 |
-
},
|
| 286 |
-
editable: true,
|
| 287 |
-
droppable: true,
|
| 288 |
-
events: [
|
| 289 |
-
{
|
| 290 |
-
title: 'Interview with Maria',
|
| 291 |
-
start: '2024-03-20T10:00:00',
|
| 292 |
-
end: '2024-03-20T11:00:00',
|
| 293 |
-
backgroundColor: '#4f46e5',
|
| 294 |
-
extendedProps: {
|
| 295 |
-
participant: 'Maria Gonzalez',
|
| 296 |
-
project: 'Urban Sustainability Study',
|
| 297 |
-
teamMembers: ['John Doe', 'Jane Smith']
|
| 298 |
-
}
|
| 299 |
-
}
|
| 300 |
-
]
|
| 301 |
-
});
|
| 302 |
-
calendar.render();
|
| 303 |
});
|
| 304 |
|
| 305 |
-
//
|
| 306 |
-
|
| 307 |
-
constructor() {
|
| 308 |
-
this.mediaRecorder = null;
|
| 309 |
-
this.audioChunks = [];
|
| 310 |
-
this.isRecording = false;
|
| 311 |
-
this.stream = null;
|
| 312 |
-
this.availableDevices = {
|
| 313 |
-
audioInputs: [],
|
| 314 |
-
videoInputs: []
|
| 315 |
-
};
|
| 316 |
-
}
|
| 317 |
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
this.availableDevices.videoInputs = devices.filter(device => device.kind === 'videoinput');
|
| 324 |
-
|
| 325 |
-
// Update device selectors
|
| 326 |
-
this.updateDeviceSelectors();
|
| 327 |
-
|
| 328 |
-
// Initialize default audio stream
|
| 329 |
-
await this.setupAudioStream(this.availableDevices.audioInputs[0]?.deviceId);
|
| 330 |
-
} catch (error) {
|
| 331 |
-
console.error('Error initializing recording:', error);
|
| 332 |
-
this.showError('Failed to initialize recording devices');
|
| 333 |
-
}
|
| 334 |
-
}
|
| 335 |
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
}
|
| 343 |
-
}
|
| 344 |
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
this.stream = await navigator.mediaDevices.getUserMedia(constraints);
|
| 353 |
-
|
| 354 |
-
// Initialize WaveSurfer with the audio stream
|
| 355 |
-
wavesurfer.microphone.start({
|
| 356 |
-
stream: this.stream,
|
| 357 |
-
bufferSize: 4096
|
| 358 |
-
});
|
| 359 |
-
|
| 360 |
-
// Initialize MediaRecorder
|
| 361 |
-
this.mediaRecorder = new MediaRecorder(this.stream);
|
| 362 |
-
this.setupMediaRecorderEvents();
|
| 363 |
-
} catch (error) {
|
| 364 |
-
console.error('Error setting up audio stream:', error);
|
| 365 |
-
this.showError('Failed to access microphone');
|
| 366 |
-
}
|
| 367 |
-
}
|
| 368 |
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
this.mediaRecorder.onstop = () => {
|
| 377 |
-
const audioBlob = new Blob(this.audioChunks, { type: 'audio/wav' });
|
| 378 |
-
const audioUrl = URL.createObjectURL(audioBlob);
|
| 379 |
-
wavesurfer.load(audioUrl);
|
| 380 |
-
this.audioChunks = [];
|
| 381 |
-
};
|
| 382 |
-
}
|
| 383 |
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
|
|
|
|
|
|
| 388 |
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
|
|
|
| 406 |
}
|
|
|
|
|
|
|
| 407 |
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
recordButton.classList.toggle('bg-gray-500', !isRecording);
|
| 413 |
-
recordButton.classList.toggle('recording-pulse', isRecording);
|
| 414 |
-
}
|
| 415 |
}
|
|
|
|
| 416 |
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
|
|
|
| 420 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 425 |
}
|
| 426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 427 |
}
|
| 428 |
}
|
| 429 |
|
| 430 |
-
//
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
});
|
| 443 |
|
| 444 |
-
//
|
| 445 |
-
|
| 446 |
-
|
| 447 |
});
|
| 448 |
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
|
|
|
|
|
|
| 455 |
});
|
|
|
|
|
|
|
|
|
|
| 456 |
</script>
|
| 457 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=dataquantals/quantals-collect" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 458 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Transcriber - Quantals Collect</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<!-- Wavesurfer.js for audio visualization -->
|
|
|
|
|
|
|
|
|
|
| 10 |
<script src="https://unpkg.com/wavesurfer.js@6.6.3"></script>
|
| 11 |
+
<!-- CodeMirror for rich text editing -->
|
| 12 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css" rel="stylesheet">
|
| 13 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/theme/monokai.min.css" rel="stylesheet">
|
| 14 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
|
| 15 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/markdown/markdown.min.js"></script>
|
| 16 |
<style>
|
|
|
|
| 17 |
.sidebar {
|
| 18 |
transition: all 0.3s ease;
|
| 19 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
.waveform-container {
|
| 21 |
background: linear-gradient(90deg, #03045e, #accd5a, #fb5607);
|
| 22 |
background-size: 400% 400%;
|
|
|
|
| 27 |
50% { background-position: 100% 50%; }
|
| 28 |
100% { background-position: 0% 50%; }
|
| 29 |
}
|
| 30 |
+
.CodeMirror {
|
| 31 |
+
height: calc(100vh - 400px);
|
| 32 |
+
border: 1px solid #e5e7eb;
|
| 33 |
+
border-radius: 0.5rem;
|
| 34 |
}
|
| 35 |
+
.loading-dots::after {
|
| 36 |
+
content: '...';
|
| 37 |
+
animation: dots 1.5s steps(5, end) infinite;
|
| 38 |
}
|
| 39 |
+
@keyframes dots {
|
| 40 |
+
0%, 20% { content: '.'; }
|
| 41 |
+
40% { content: '..'; }
|
| 42 |
+
60% { content: '...'; }
|
| 43 |
+
80%, 100% { content: ''; }
|
| 44 |
}
|
| 45 |
+
.fade-in {
|
| 46 |
+
animation: fadeIn 0.3s ease-in;
|
|
|
|
| 47 |
}
|
| 48 |
+
@keyframes fadeIn {
|
| 49 |
+
from { opacity: 0; }
|
| 50 |
+
to { opacity: 1; }
|
| 51 |
+
}
|
| 52 |
+
.transcription-mode {
|
| 53 |
+
transition: all 0.3s ease;
|
| 54 |
}
|
| 55 |
+
.transcription-mode.active {
|
| 56 |
+
background-color: #4f46e5;
|
| 57 |
+
color: white;
|
| 58 |
}
|
| 59 |
</style>
|
| 60 |
</head>
|
| 61 |
+
<body class="bg-gray-50">
|
| 62 |
<div class="flex h-screen overflow-hidden">
|
| 63 |
<!-- Sidebar -->
|
| 64 |
<div class="sidebar bg-indigo-800 text-white w-64 flex flex-col">
|
|
|
|
| 82 |
<i class="fas fa-users"></i>
|
| 83 |
<span>Participants</span>
|
| 84 |
</a>
|
| 85 |
+
<a href="interviews.html" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
|
| 86 |
<i class="fas fa-microphone"></i>
|
| 87 |
<span>Interviews</span>
|
| 88 |
</a>
|
|
|
|
| 98 |
<i class="fas fa-robot"></i>
|
| 99 |
<span>AI Assist</span>
|
| 100 |
</a>
|
| 101 |
+
<a href="transcriber.html" class="flex items-center space-x-3 p-2 rounded-lg bg-indigo-700 text-white">
|
| 102 |
<i class="fas fa-keyboard"></i>
|
| 103 |
<span>Transcriber</span>
|
| 104 |
</a>
|
|
|
|
| 114 |
|
| 115 |
<!-- Main Content Area -->
|
| 116 |
<div class="flex-1 flex flex-col overflow-hidden">
|
| 117 |
+
<!-- Header -->
|
| 118 |
<header class="bg-white shadow-sm p-4">
|
| 119 |
+
<div class="max-w-7xl mx-auto">
|
| 120 |
+
<h1 class="text-2xl font-bold text-gray-900">Transcriber</h1>
|
| 121 |
+
<p class="mt-1 text-sm text-gray-600">
|
| 122 |
+
Transcribe interviews, field recordings, or videos manually or with AI.
|
| 123 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
</div>
|
| 125 |
</header>
|
| 126 |
|
| 127 |
<!-- Main Content -->
|
| 128 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
| 129 |
+
<!-- Mode Toggle -->
|
| 130 |
+
<div class="bg-white border-b border-gray-200">
|
| 131 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 132 |
+
<div class="flex space-x-4">
|
| 133 |
+
<button id="manual-mode" class="transcription-mode px-4 py-2 rounded-lg text-gray-600 hover:bg-gray-100 active">
|
| 134 |
+
<i class="fas fa-keyboard mr-2"></i>Manual Transcription
|
| 135 |
+
</button>
|
| 136 |
+
<button id="ai-mode" class="transcription-mode px-4 py-2 rounded-lg text-gray-600 hover:bg-gray-100">
|
| 137 |
+
<i class="fas fa-robot mr-2"></i>AI Transcription
|
| 138 |
+
</button>
|
| 139 |
+
</div>
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
|
| 143 |
+
<!-- Workspace -->
|
| 144 |
+
<div class="flex-1 p-4 overflow-y-auto">
|
| 145 |
+
<div class="max-w-7xl mx-auto">
|
| 146 |
+
<!-- Manual Transcription Workspace -->
|
| 147 |
+
<div id="manual-workspace" class="space-y-4">
|
| 148 |
+
<!-- Upload Media -->
|
| 149 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 150 |
+
<div class="flex justify-between items-center mb-4">
|
| 151 |
+
<h3 class="text-lg font-semibold text-gray-800">Upload Media</h3>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
|
| 155 |
+
<input type="file" id="manual-media-upload" class="hidden" accept=".mp3,.wav,.mp4">
|
| 156 |
+
<label for="manual-media-upload" class="cursor-pointer">
|
| 157 |
+
<i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-2"></i>
|
| 158 |
+
<p class="text-gray-600">Drag and drop your audio/video file here or click to browse</p>
|
| 159 |
+
<p class="text-sm text-gray-500 mt-1">Max file size: 100MB</p>
|
| 160 |
+
</label>
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
|
| 164 |
+
<!-- Audio Player -->
|
| 165 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 166 |
<div class="flex justify-between items-center mb-4">
|
| 167 |
+
<h3 class="text-lg font-semibold text-gray-800">Audio Player</h3>
|
| 168 |
+
<div class="flex items-center space-x-2">
|
| 169 |
+
<select id="playback-speed" class="px-2 py-1 text-sm border border-gray-300 rounded-lg">
|
| 170 |
+
<option value="0.5">0.5x</option>
|
| 171 |
+
<option value="0.75">0.75x</option>
|
| 172 |
+
<option value="1" selected>1x</option>
|
| 173 |
+
<option value="1.25">1.25x</option>
|
| 174 |
+
<option value="1.5">1.5x</option>
|
| 175 |
+
<option value="2">2x</option>
|
| 176 |
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
</div>
|
| 178 |
</div>
|
| 179 |
|
| 180 |
+
<div class="waveform-container h-24 rounded-lg mb-4" id="waveform"></div>
|
| 181 |
|
| 182 |
<div class="flex justify-center space-x-4">
|
| 183 |
+
<button class="p-2 bg-gray-100 rounded-full hover:bg-gray-200" id="skip-backward">
|
| 184 |
<i class="fas fa-step-backward text-gray-600"></i>
|
| 185 |
</button>
|
| 186 |
+
<button class="p-2 bg-gray-100 rounded-full hover:bg-gray-200" id="play-pause">
|
| 187 |
+
<i class="fas fa-play text-gray-600"></i>
|
| 188 |
</button>
|
| 189 |
+
<button class="p-2 bg-gray-100 rounded-full hover:bg-gray-200" id="skip-forward">
|
| 190 |
<i class="fas fa-step-forward text-gray-600"></i>
|
| 191 |
</button>
|
| 192 |
</div>
|
| 193 |
|
| 194 |
+
<div class="mt-4 flex justify-between items-center text-sm text-gray-500">
|
| 195 |
+
<span id="current-time">00:00</span>
|
| 196 |
+
<span id="duration">00:00</span>
|
| 197 |
+
</div>
|
| 198 |
+
</div>
|
| 199 |
+
|
| 200 |
+
<!-- Transcription Editor -->
|
| 201 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 202 |
+
<div class="flex justify-between items-center mb-4">
|
| 203 |
+
<h3 class="text-lg font-semibold text-gray-800">Transcription</h3>
|
| 204 |
<div class="flex items-center space-x-2">
|
| 205 |
+
<button id="insert-timestamp" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
|
| 206 |
+
<i class="fas fa-clock mr-1"></i>Insert Timestamp
|
| 207 |
+
</button>
|
| 208 |
+
<button id="save-draft" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
|
| 209 |
+
<i class="fas fa-save mr-1"></i>Save Draft
|
| 210 |
+
</button>
|
| 211 |
+
<button id="export-transcript" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
|
| 212 |
+
<i class="fas fa-download mr-1"></i>Export
|
| 213 |
+
</button>
|
| 214 |
</div>
|
| 215 |
+
</div>
|
| 216 |
+
<textarea id="transcription-editor" class="w-full h-64 p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"></textarea>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<!-- AI Transcription Workspace -->
|
| 221 |
+
<div id="ai-workspace" class="hidden space-y-4">
|
| 222 |
+
<!-- File Upload -->
|
| 223 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 224 |
+
<div class="flex justify-between items-center mb-4">
|
| 225 |
+
<h3 class="text-lg font-semibold text-gray-800">Upload Media</h3>
|
| 226 |
+
<div class="flex items-center space-x-2">
|
| 227 |
+
<select id="language-select" class="px-3 py-1 text-sm border border-gray-300 rounded-lg">
|
| 228 |
+
<option value="en">English</option>
|
| 229 |
+
<option value="es">Spanish</option>
|
| 230 |
+
<option value="fr">French</option>
|
| 231 |
+
<option value="de">German</option>
|
| 232 |
+
<option value="zh">Chinese</option>
|
| 233 |
+
</select>
|
| 234 |
</div>
|
| 235 |
</div>
|
| 236 |
+
|
| 237 |
+
<div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
|
| 238 |
+
<input type="file" id="media-upload" class="hidden" accept=".mp3,.wav,.mp4">
|
| 239 |
+
<label for="media-upload" class="cursor-pointer">
|
| 240 |
+
<i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-2"></i>
|
| 241 |
+
<p class="text-gray-600">Drag and drop your audio/video file here or click to browse</p>
|
| 242 |
+
<p class="text-sm text-gray-500 mt-1">Max file size: 100MB</p>
|
| 243 |
+
</label>
|
| 244 |
+
</div>
|
| 245 |
</div>
|
| 246 |
|
| 247 |
+
<!-- AI Options -->
|
| 248 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 249 |
+
<h3 class="text-lg font-semibold text-gray-800 mb-4">AI Enhancement Options</h3>
|
| 250 |
+
<div class="grid grid-cols-2 gap-4">
|
| 251 |
+
<button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
|
| 252 |
+
<i class="fas fa-brain text-indigo-600 mr-2"></i>Summarize Transcript
|
| 253 |
+
</button>
|
| 254 |
+
<button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
|
| 255 |
+
<i class="fas fa-tags text-indigo-600 mr-2"></i>Generate Speaker Labels
|
| 256 |
+
</button>
|
| 257 |
+
<button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
|
| 258 |
+
<i class="fas fa-language text-indigo-600 mr-2"></i>Translate to English
|
| 259 |
+
</button>
|
| 260 |
+
<button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
|
| 261 |
+
<i class="fas fa-search text-indigo-600 mr-2"></i>Highlight Keywords
|
| 262 |
+
</button>
|
| 263 |
</div>
|
| 264 |
</div>
|
|
|
|
|
|
|
|
|
|
| 265 |
|
| 266 |
+
<!-- Output Panel -->
|
| 267 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 268 |
+
<div class="flex justify-between items-center mb-4">
|
| 269 |
+
<h3 class="text-lg font-semibold text-gray-800">Transcription Output</h3>
|
| 270 |
+
<div class="flex items-center space-x-2">
|
| 271 |
+
<button id="copy-output" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
|
| 272 |
+
<i class="fas fa-copy mr-1"></i>Copy
|
| 273 |
+
</button>
|
| 274 |
+
<button id="download-output" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
|
| 275 |
+
<i class="fas fa-download mr-1"></i>Download
|
| 276 |
+
</button>
|
| 277 |
+
</div>
|
| 278 |
</div>
|
| 279 |
+
<div id="ai-output" class="w-full min-h-64 p-3 border border-gray-300 rounded-lg bg-gray-50"></div>
|
| 280 |
</div>
|
| 281 |
</div>
|
| 282 |
</div>
|
| 283 |
</div>
|
| 284 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 285 |
</div>
|
| 286 |
</div>
|
| 287 |
|
| 288 |
+
<!-- Scripts -->
|
| 289 |
<script>
|
| 290 |
+
// Initialize WaveSurfer
|
| 291 |
+
const wavesurfer = WaveSurfer.create({
|
| 292 |
+
container: '#waveform',
|
| 293 |
+
waveColor: '#4f46e5',
|
| 294 |
+
progressColor: '#818cf8',
|
| 295 |
+
cursorColor: '#1e40af',
|
| 296 |
+
barWidth: 2,
|
| 297 |
+
barRadius: 3,
|
| 298 |
+
responsive: true,
|
| 299 |
+
height: 80
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
});
|
| 301 |
|
| 302 |
+
// Get editor element
|
| 303 |
+
const editor = document.getElementById('transcription-editor');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
|
| 305 |
+
// Mode Toggle
|
| 306 |
+
const manualMode = document.getElementById('manual-mode');
|
| 307 |
+
const aiMode = document.getElementById('ai-mode');
|
| 308 |
+
const manualWorkspace = document.getElementById('manual-workspace');
|
| 309 |
+
const aiWorkspace = document.getElementById('ai-workspace');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
+
manualMode.addEventListener('click', () => {
|
| 312 |
+
manualMode.classList.add('active');
|
| 313 |
+
aiMode.classList.remove('active');
|
| 314 |
+
manualWorkspace.classList.remove('hidden');
|
| 315 |
+
aiWorkspace.classList.add('hidden');
|
| 316 |
+
});
|
|
|
|
|
|
|
| 317 |
|
| 318 |
+
aiMode.addEventListener('click', () => {
|
| 319 |
+
aiMode.classList.add('active');
|
| 320 |
+
manualMode.classList.remove('active');
|
| 321 |
+
aiWorkspace.classList.remove('hidden');
|
| 322 |
+
manualWorkspace.classList.add('hidden');
|
| 323 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 324 |
|
| 325 |
+
// Audio Controls
|
| 326 |
+
const playPauseBtn = document.getElementById('play-pause');
|
| 327 |
+
const skipForwardBtn = document.getElementById('skip-forward');
|
| 328 |
+
const skipBackwardBtn = document.getElementById('skip-backward');
|
| 329 |
+
const playbackSpeed = document.getElementById('playback-speed');
|
| 330 |
+
const currentTime = document.getElementById('current-time');
|
| 331 |
+
const duration = document.getElementById('duration');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
|
| 333 |
+
playPauseBtn.addEventListener('click', () => {
|
| 334 |
+
wavesurfer.playPause();
|
| 335 |
+
const icon = playPauseBtn.querySelector('i');
|
| 336 |
+
icon.classList.toggle('fa-play');
|
| 337 |
+
icon.classList.toggle('fa-pause');
|
| 338 |
+
});
|
| 339 |
|
| 340 |
+
skipForwardBtn.addEventListener('click', () => {
|
| 341 |
+
wavesurfer.skip(10);
|
| 342 |
+
});
|
| 343 |
+
|
| 344 |
+
skipBackwardBtn.addEventListener('click', () => {
|
| 345 |
+
wavesurfer.skip(-10);
|
| 346 |
+
});
|
| 347 |
+
|
| 348 |
+
playbackSpeed.addEventListener('change', (e) => {
|
| 349 |
+
wavesurfer.setPlaybackRate(parseFloat(e.target.value));
|
| 350 |
+
});
|
| 351 |
+
|
| 352 |
+
wavesurfer.on('ready', () => {
|
| 353 |
+
duration.textContent = formatTime(wavesurfer.getDuration());
|
| 354 |
+
});
|
| 355 |
+
|
| 356 |
+
wavesurfer.on('audioprocess', () => {
|
| 357 |
+
currentTime.textContent = formatTime(wavesurfer.getCurrentTime());
|
| 358 |
+
});
|
| 359 |
+
|
| 360 |
+
// Format time
|
| 361 |
+
function formatTime(time) {
|
| 362 |
+
const minutes = Math.floor(time / 60);
|
| 363 |
+
const seconds = Math.floor(time % 60);
|
| 364 |
+
return `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// Insert timestamp
|
| 368 |
+
document.getElementById('insert-timestamp').addEventListener('click', () => {
|
| 369 |
+
const time = formatTime(wavesurfer.getCurrentTime());
|
| 370 |
+
const start = editor.selectionStart;
|
| 371 |
+
const end = editor.selectionEnd;
|
| 372 |
+
const text = editor.value;
|
| 373 |
+
editor.value = text.substring(0, start) + `[${time}] ` + text.substring(end);
|
| 374 |
+
editor.focus();
|
| 375 |
+
editor.setSelectionRange(start + `[${time}] `.length, start + `[${time}] `.length);
|
| 376 |
+
});
|
| 377 |
+
|
| 378 |
+
// Keyboard shortcuts
|
| 379 |
+
document.addEventListener('keydown', (e) => {
|
| 380 |
+
if (e.code === 'Space' && !e.target.matches('textarea, input')) {
|
| 381 |
+
e.preventDefault();
|
| 382 |
+
playPauseBtn.click();
|
| 383 |
}
|
| 384 |
+
if (e.ctrlKey && e.code === 'KeyB') {
|
| 385 |
+
e.preventDefault();
|
| 386 |
+
document.getElementById('insert-timestamp').click();
|
| 387 |
+
}
|
| 388 |
+
});
|
| 389 |
|
| 390 |
+
// File upload handling
|
| 391 |
+
const mediaUpload = document.getElementById('media-upload');
|
| 392 |
+
const manualMediaUpload = document.getElementById('manual-media-upload');
|
| 393 |
+
|
| 394 |
+
function handleMediaUpload(file) {
|
| 395 |
+
if (file.type.startsWith('audio/')) {
|
| 396 |
+
wavesurfer.loadBlob(file);
|
| 397 |
}
|
| 398 |
+
handleFileUpload(file);
|
| 399 |
+
}
|
| 400 |
|
| 401 |
+
mediaUpload.addEventListener('change', (e) => {
|
| 402 |
+
const file = e.target.files[0];
|
| 403 |
+
if (file) {
|
| 404 |
+
handleMediaUpload(file);
|
|
|
|
|
|
|
|
|
|
| 405 |
}
|
| 406 |
+
});
|
| 407 |
|
| 408 |
+
manualMediaUpload.addEventListener('change', (e) => {
|
| 409 |
+
const file = e.target.files[0];
|
| 410 |
+
if (file) {
|
| 411 |
+
handleMediaUpload(file);
|
| 412 |
}
|
| 413 |
+
});
|
| 414 |
+
|
| 415 |
+
// Handle file upload for AI transcription
|
| 416 |
+
async function handleFileUpload(file) {
|
| 417 |
+
const formData = new FormData();
|
| 418 |
+
formData.append('file', file);
|
| 419 |
|
| 420 |
+
try {
|
| 421 |
+
const response = await fetch('https://openrouter.ai/api/v1/chat/completions', {
|
| 422 |
+
method: 'POST',
|
| 423 |
+
headers: {
|
| 424 |
+
'Authorization': 'Bearer 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',
|
| 425 |
+
'Content-Type': 'application/json'
|
| 426 |
+
},
|
| 427 |
+
body: JSON.stringify({
|
| 428 |
+
model: "deepseek-coder:52-r1",
|
| 429 |
+
messages: [
|
| 430 |
+
{
|
| 431 |
+
role: "system",
|
| 432 |
+
content: "You are a transcription assistant. Your task is to accurately transcribe audio into clean, readable text, removing filler words, stutters, and repetition unless contextually relevant."
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
role: "user",
|
| 436 |
+
content: "Transcribe the following audio file: " + file.name
|
| 437 |
+
}
|
| 438 |
+
]
|
| 439 |
+
})
|
| 440 |
+
});
|
| 441 |
+
|
| 442 |
+
if (!response.ok) {
|
| 443 |
+
throw new Error('Transcription failed');
|
| 444 |
}
|
| 445 |
+
|
| 446 |
+
const data = await response.json();
|
| 447 |
+
document.getElementById('ai-output').innerHTML = data.choices[0].message.content;
|
| 448 |
+
} catch (error) {
|
| 449 |
+
console.error('Error:', error);
|
| 450 |
+
document.getElementById('ai-output').innerHTML = `
|
| 451 |
+
<div class="text-red-600">
|
| 452 |
+
<i class="fas fa-exclamation-circle mr-2"></i>
|
| 453 |
+
Error: ${error.message}
|
| 454 |
+
</div>
|
| 455 |
+
`;
|
| 456 |
}
|
| 457 |
}
|
| 458 |
|
| 459 |
+
// Auto-save functionality
|
| 460 |
+
let autoSaveTimeout;
|
| 461 |
+
editor.addEventListener('input', () => {
|
| 462 |
+
clearTimeout(autoSaveTimeout);
|
| 463 |
+
autoSaveTimeout = setTimeout(() => {
|
| 464 |
+
localStorage.setItem('transcription_draft', editor.value);
|
| 465 |
+
}, 30000);
|
| 466 |
+
});
|
| 467 |
+
|
| 468 |
+
// Load draft on page load
|
| 469 |
+
const savedDraft = localStorage.getItem('transcription_draft');
|
| 470 |
+
if (savedDraft) {
|
| 471 |
+
editor.value = savedDraft;
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
// Export functionality
|
| 475 |
+
document.getElementById('export-transcript').addEventListener('click', () => {
|
| 476 |
+
const content = editor.value;
|
| 477 |
+
const blob = new Blob([content], { type: 'text/plain' });
|
| 478 |
+
const url = window.URL.createObjectURL(blob);
|
| 479 |
+
const a = document.createElement('a');
|
| 480 |
+
a.href = url;
|
| 481 |
+
a.download = `transcript-${new Date().toISOString()}.txt`;
|
| 482 |
+
document.body.appendChild(a);
|
| 483 |
+
a.click();
|
| 484 |
+
window.URL.revokeObjectURL(url);
|
| 485 |
+
document.body.removeChild(a);
|
| 486 |
+
});
|
| 487 |
+
|
| 488 |
+
// Copy output
|
| 489 |
+
document.getElementById('copy-output').addEventListener('click', () => {
|
| 490 |
+
const output = document.getElementById('ai-output').innerText;
|
| 491 |
+
navigator.clipboard.writeText(output).then(() => {
|
| 492 |
+
const button = document.getElementById('copy-output');
|
| 493 |
+
const originalText = button.innerHTML;
|
| 494 |
+
button.innerHTML = '<i class="fas fa-check mr-1"></i>Copied!';
|
| 495 |
+
setTimeout(() => {
|
| 496 |
+
button.innerHTML = originalText;
|
| 497 |
+
}, 2000);
|
| 498 |
+
});
|
| 499 |
+
});
|
| 500 |
+
|
| 501 |
+
// Download output
|
| 502 |
+
document.getElementById('download-output').addEventListener('click', () => {
|
| 503 |
+
const output = document.getElementById('ai-output').innerText;
|
| 504 |
+
const blob = new Blob([output], { type: 'text/plain' });
|
| 505 |
+
const url = window.URL.createObjectURL(blob);
|
| 506 |
+
const a = document.createElement('a');
|
| 507 |
+
a.href = url;
|
| 508 |
+
a.download = `ai-transcript-${new Date().toISOString()}.txt`;
|
| 509 |
+
document.body.appendChild(a);
|
| 510 |
+
a.click();
|
| 511 |
+
window.URL.revokeObjectURL(url);
|
| 512 |
+
document.body.removeChild(a);
|
| 513 |
});
|
| 514 |
|
| 515 |
+
// Check online status
|
| 516 |
+
window.addEventListener('online', () => {
|
| 517 |
+
document.getElementById('ai-mode').disabled = false;
|
| 518 |
});
|
| 519 |
|
| 520 |
+
window.addEventListener('offline', () => {
|
| 521 |
+
document.getElementById('ai-mode').disabled = true;
|
| 522 |
+
document.getElementById('ai-output').innerHTML = `
|
| 523 |
+
<div class="text-red-600">
|
| 524 |
+
<i class="fas fa-wifi-slash mr-2"></i>
|
| 525 |
+
No internet connection. Please check your network.
|
| 526 |
+
</div>
|
| 527 |
+
`;
|
| 528 |
});
|
| 529 |
+
|
| 530 |
+
// Initialize
|
| 531 |
+
manualMode.click();
|
| 532 |
</script>
|
| 533 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=dataquantals/quantals-collect" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 534 |
</html>
|