-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
88 lines (80 loc) · 3.69 KB
/
index.html
File metadata and controls
88 lines (80 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transcript Synchronizer</title>
<link rel="stylesheet" href="styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
</head>
<body>
<div class="container">
<header>
<h1>Transcript Synchronizer</h1>
<p class="subtitle">Merge timestamped VTT files with corrected transcripts</p>
</header>
<main>
<div class="instructions">
<h2>How it works</h2>
<ol>
<li>Upload your <strong>corrected transcript</strong> (PDF or TXT with speaker labels like "John:" or "Interviewer:")</li>
<li>Upload your <strong>uncorrected VTT file</strong> (with timestamps from MacWhisper or similar)</li>
<li>Click "Process" to align and merge them</li>
<li>Download your new VTT file with corrected text and accurate timestamps</li>
</ol>
<p class="note"><strong>Note:</strong> TXT files recommended for cleanest results. Export from Acrobat Pro: File → Export To → Text.</p>
</div>
<div class="upload-section">
<div class="upload-box" id="pdfUpload">
<div class="upload-icon">📄</div>
<h3>Corrected Transcript (PDF or TXT)</h3>
<p class="upload-text">Drag and drop or click to select</p>
<input type="file" id="pdfFile" accept=".pdf,.txt" hidden>
<p class="file-name" id="pdfFileName"></p>
</div>
<div class="upload-box" id="srtUpload">
<div class="upload-icon">⏱️</div>
<h3>Timestamped VTT File</h3>
<p class="upload-text">Drag and drop or click to select</p>
<input type="file" id="srtFile" accept=".vtt" hidden>
<p class="file-name" id="srtFileName"></p>
</div>
</div>
<div class="action-section">
<button id="processBtn" class="btn-primary" disabled>Process Files</button>
<div id="progressBar" class="progress-bar hidden">
<div class="progress-fill"></div>
<p class="progress-text">Processing...</p>
</div>
</div>
<div id="resultSection" class="result-section hidden">
<div class="success-message">
<div class="success-icon">✓</div>
<h3>Processing Complete!</h3>
<p>Your synchronized transcript is ready.</p>
<button id="downloadBtn" class="btn-success">Download VTT File</button>
</div>
<div id="stats" class="stats"></div>
</div>
<div id="errorSection" class="error-section hidden">
<div class="error-message">
<div class="error-icon">⚠️</div>
<h3>Processing Error</h3>
<p id="errorText"></p>
</div>
</div>
</main>
<footer>
<p>Built with Claude Code</p>
</footer>
</div>
<script>
// Configure PDF.js worker
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
</script>
<script src="vtt-parser.js"></script>
<script src="transcript-parser.js"></script>
<script src="text-aligner.js"></script>
<script src="app.js"></script>
</body>
</html>