-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathindex.html
More file actions
1351 lines (1276 loc) · 87.2 KB
/
Copy pathindex.html
File metadata and controls
1351 lines (1276 loc) · 87.2 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
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
413
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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- (C) The Hyperaudio Project. AGPL 3.0 @license: https://www.gnu.org/licenses/agpl-3.0.en.html -->
<!-- Hyperaudio Lite Editor - Version 1.3.19 (last changed in release 1.3.19) -->
<!-- Hyperaudio Lite Editor's source code is provided under a dual license model.
Commercial license
------------------
If you want to use Hyperaudio Lite Editor to develop commercial sites, tools, and applications, the Commercial License is the appropriate license. With this option, your source code is kept proprietary. To enquire about a Hyperaudio Lite Editor Commercial License please contact mark@hyperaud.io
Open source license
-------------------
If you are creating an open source application under a license compatible with the GNU Affero GPL license v3, you may use Hyperaudio Lite Editor under the terms of the AGPL-3.0 License.
-->
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="version" content="1.3.32">
<!-- The version is bumped with the FIRST change of a release, like the
per-file cache stamps, so a working tree reports the release it is
becoming. The date is set by the release commit and stays empty until
then: Settings shows "unreleased" in its place (#615). -->
<meta name="release-date" content="2026-10-03">
<title>Hyperaudio Lite Editor</title>
<link rel="apple-touch-icon" href="images/icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="stylesheet" href="css/hyperaudio-lite-player.css?v=2.6.4">
<!-- Vendored ESM dependencies for media export (#381) — bare specifiers used
by js/media-export.js and by @mediabunny/mp3-encoder's internal
`import "mediabunny"` (the map guarantees one shared module instance).
Versions are lockstep: mediabunny and its mp3-encoder release together. -->
<script type="importmap">
{
"imports": {
"mediabunny": "./js/vendor/mediabunny-1.50.3.min.js",
"@mediabunny/mp3-encoder": "./js/vendor/mediabunny-mp3-encoder-1.50.3.min.js",
"soundtouchjs": "./js/vendor/soundtouchjs-0.3.0.js",
"hls.js": "./js/vendor/hls-1.6.16.js"
}
}
</script>
<script src="js/audio-source.js?v=1.3.17"></script>
<script src="js/hls-source.js?v=1.3.17"></script>
<script src="js/hyperaudio-lite-editor-deepgram.js?v=0.6.15"></script>
<script src="js/hyperaudio-lite-editor-assemblyai.js?v=0.8.4"></script>
<script src="js/hyperaudio-lite-editor-parakeet.js?v=0.8.5"></script>
<script src="js/transcribe-prefs.js?v=1.3.14"></script>
<script src="js/settings.js?v=1.3.25"></script>
<script src="js/experimental-features.js?v=1.3.25"></script>
<script src="js/transcription-progress.js?v=1.3.23"></script>
<script src="js/hyperaudio-lite-editor-whisper.js?v=1.3.25"></script>
<script src="js/hyperaudio-lite-editor-parakeet-local.js?v=1.3.24"></script>
<script src="js/word-alignment.js?v=1.3.8"></script>
<script src="js/html-json-converter.js?v=1.1.9"></script>
<script src="js/ionosphere-reader.js?v=1.3.16"></script>
<script src="js/transcript-to-ionosphere.js?v=1.3.16"></script>
<script src="js/whisper-json-import.js?v=1.3.17"></script>
<script src="js/paragraph-timecodes.js?v=1.2.0"></script>
<!-- Meta Tags required for
Progressive Web App -->
<meta name= "apple-mobile-web-app-status-bar" content="#aa7700">
<meta name="theme-color" content="black">
<!-- Manifest File link -->
<link rel="manifest" href="manifest.json">
<style>
p {
padding-bottom: 1.5em;
line-height: 1.8;
}
.side-panel {
background-color: #f5f5f5;
position: absolute;
top: 0;
left: 0;
bottom: 0;
padding: 8px;
overflow-y: hidden;
width: 400px;
transition: left 0.5s ease;
}
.side-panel h1 {
color: white;
}
.main-panel {
position: absolute;
left:400px;
right:0;
background-color: #f5f5f5;
transition: left 0.5s ease;
}
#speaker-display {
margin-top: -30px;
text-align: right;
padding-right: 20px;
}
[contenteditable]:focus {
outline: 0px solid transparent;
}
.caption {
content-visibility:auto;
contain-intrinsic-size: auto 300px;
height:300px;
}
</style>
<!-- Boot-restore anti-flash (#473): when the synchronous hint says a
project exists, hide the static demo transcript BEFORE first paint —
the OPFS restore is async and will replace it. hyperaudio-save.js
reveals when the restore lands; the timeout fails safe so a script
error can never leave the transcript hidden. Crawlers have clean
storage, so their first paint is unchanged. -->
<script>
try {
if (localStorage.getItem('hyperaudioHasProjects') === '1') {
document.documentElement.classList.add('ha-restoring');
setTimeout(function () {
document.documentElement.classList.remove('ha-restoring');
}, 4000);
}
} catch (e) { /* private mode: no hint, no hide */ }
</script>
<link rel="stylesheet" href="css/hyperaudio-lite-editor.css?v=1.3.32">
<!-- DaisyUI / Tailwind - must be loaded last -->
<link rel="stylesheet" href="css/tailwind-min.css">
</head>
<body data-theme="light">
<!-- templates -->
<template id="deepgram-modal-template">
<form id="deepgram-form" name="deepgram-form">
<div class="flex flex-col gap-4 w-full">
<div class="key-field">
<input id="token" type="password" placeholder="Deepgram token" class="input input-bordered w-full" />
<button type="button" class="key-eye" aria-label="Show key" tabindex="-1">
<svg class="eye-open" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>
<svg class="eye-closed" style="display:none" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>
</button>
</div>
<label style="display:flex; gap:8px; align-items:center; cursor:pointer">
<input id="deepgram-remember-key" type="checkbox" class="toggle toggle-primary" checked />
<span class="label-text" style="font-size:0.85rem; opacity:0.85">Remember key on this device</span>
</label>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
<input id="deepgram-file" name="file" type="file" class="file-input w-full max-w-xs" aria-label="Media file to transcribe" title="" />
<details class="url-source">
<summary class="label-text">Transcribe from a URL instead</summary>
<input id="deepgram-media" type="text" placeholder="Link to media" class="input input-bordered w-full max-w-xs" />
</details>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
<label class="label-text" for="language-model">Model</label>
<div>
<select id="language-model" name="language-model" placeholder="language-model" class="select select-bordered w-full max-w-xs">
</select>
</div>
<label class="label-text" for="language">Language</label>
<select id="language" name="language" placeholder="language" class="select select-bordered w-full max-w-xs">
</select>
</div>
<div class="modal-action">
<label id="transcribe-btn" for="transcribe-modal" class="btn btn-primary btn-disabled" aria-disabled="true">TRANSCRIBE</label>
</div>
</form>
</template>
<template id="assemblyai-modal-template">
<form id="assemblyai-form" name="assemblyai-form">
<div class="flex flex-col gap-4 w-full">
<div class="key-field">
<input id="assemblyai-key" type="password" placeholder="AssemblyAI API key" class="input input-bordered w-full" />
<button type="button" class="key-eye" aria-label="Show key" tabindex="-1">
<svg class="eye-open" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>
<svg class="eye-closed" style="display:none" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>
</button>
</div>
<label style="display:flex; gap:8px; align-items:center; cursor:pointer">
<input id="assemblyai-remember-key" type="checkbox" class="toggle toggle-primary" checked />
<span class="label-text" style="font-size:0.85rem; opacity:0.85">Remember key on this device</span>
</label>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
<input id="assemblyai-file" name="file" type="file" class="file-input w-full max-w-xs" aria-label="Media file to transcribe" title="" />
<details class="url-source">
<summary class="label-text">Transcribe from a URL instead</summary>
<input id="assemblyai-media" type="text" placeholder="Link to media" class="input input-bordered w-full max-w-xs" />
</details>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
<label class="label-text" for="assemblyai-model">Model</label>
<select id="assemblyai-model" name="assemblyai-model" class="select select-bordered w-full max-w-xs"></select>
<label class="label-text" for="assemblyai-language">Language</label>
<select id="assemblyai-language" name="assemblyai-language" class="select select-bordered w-full max-w-xs"></select>
</div>
<div class="modal-action">
<label id="assemblyai-submit-btn" for="transcribe-modal" class="btn btn-primary btn-disabled" aria-disabled="true">TRANSCRIBE</label>
</div>
</form>
</template>
<template id="parakeet-hf-modal-template">
<form id="parakeet-hf-form" name="parakeet-hf-form">
<div class="flex flex-col gap-4 w-full">
<div class="key-field">
<input id="parakeet-hf-key" type="password" placeholder="HuggingFace token" class="input input-bordered w-full" />
<button type="button" class="key-eye" aria-label="Show key" tabindex="-1">
<svg class="eye-open" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>
<svg class="eye-closed" style="display:none" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>
</button>
</div>
<label style="display:flex; gap:8px; align-items:center; cursor:pointer">
<input id="parakeet-hf-remember-key" type="checkbox" class="toggle toggle-primary" checked />
<span class="label-text" style="font-size:0.85rem; opacity:0.85">Remember key on this device</span>
</label>
<span class="label-text" style="font-size:0.8rem; opacity:0.7">Create a free token at huggingface.co/settings/tokens</span>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
<input id="parakeet-hf-file" name="file" type="file" class="file-input w-full max-w-xs" aria-label="Media file to transcribe" title="" />
<details class="url-source">
<summary class="label-text">Transcribe from a URL instead</summary>
<input id="parakeet-hf-media" type="text" placeholder="Link to media" class="input input-bordered w-full max-w-xs" />
</details>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
<label class="label-text" for="parakeet-hf-language">Language</label>
<select id="parakeet-hf-language" name="parakeet-hf-language" class="select select-bordered w-full max-w-xs"></select>
</div>
<div class="modal-action">
<label id="parakeet-hf-submit-btn" for="transcribe-modal" class="btn btn-primary btn-disabled" aria-disabled="true">TRANSCRIBE</label>
</div>
</form>
</template>
<template id="whisper-client-template">
<form>
<div class="mb-3">
<input id="file-input" name="file" type="file" class="file-input w-full max-w-xs" aria-label="Media file to transcribe" title="" />
<details class="url-source" style="margin-top:1rem">
<summary class="label-text">Transcribe from a URL instead</summary>
<input id="media" type="text" placeholder="Media or HLS (.m3u8) URL" class="input input-bordered w-full max-w-xs" />
<span style="display:block; padding:6px 0 0; font-size:80%; opacity:0.7" class="label-text">The source must allow cross-origin access (CORS).</span>
</details>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
</div>
<div class="mb-3">
<label for="model-name-input" class="form-label label-text">Which model should be used?</label>
<div>
<select class="form-select select select-bordered w-full max-w-xs" aria-label="Whisper model" id="model-name-input">
<option value="tiny">Whisper (Tiny) – ~40–80 MB, fastest, least accurate</option>
<option selected="" value="base">Whisper (Base) – ~80–150 MB</option>
<option value="small">Whisper (Small) – ~250–490 MB</option>
<option value="turbo">Whisper (Large v3 Turbo) – ~560 MB, needs GPU</option>
</select>
</div>
<label for="whisper-language" class="form-label label-text" style="display:block; padding-top:12px">Language</label>
<div>
<select class="form-select select select-bordered w-full max-w-xs" id="whisper-language">
<option selected="" value="en">English</option>
<option value="">Auto-detect</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="it">Italian</option>
<option value="pt">Portuguese</option>
<option value="nl">Dutch</option>
<option value="sv">Swedish</option>
<option value="no">Norwegian</option>
<option value="da">Danish</option>
<option value="fi">Finnish</option>
<option value="pl">Polish</option>
<option value="cs">Czech</option>
<option value="el">Greek</option>
<option value="ro">Romanian</option>
<option value="hu">Hungarian</option>
<option value="ru">Russian</option>
<option value="uk">Ukrainian</option>
<option value="tr">Turkish</option>
<option value="ar">Arabic</option>
<option value="he">Hebrew</option>
<option value="hi">Hindi</option>
<option value="id">Indonesian</option>
<option value="vi">Vietnamese</option>
<option value="th">Thai</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="zh">Chinese</option>
</select>
</div>
<div class="form-text" style="font-size: 90%;">
<p style="padding-top:12px">Models download once, then run locally – on your GPU when available. Larger models are more accurate but slower.</p>
<p>For non-English media select the language – auto-detect can mistranslate on the smaller models.</p>
</div>
</div>
<div class="modal-action">
<label id="form-submit-btn" for="transcribe-modal" class="btn btn-primary btn-disabled" aria-disabled="true">TRANSCRIBE</label>
</div>
</form>
</template>
<template id="parakeet-local-template">
<form>
<div class="mb-3">
<input id="parakeet-file-input" name="file" type="file" class="file-input w-full max-w-xs" aria-label="Media file to transcribe" title="" />
<details class="url-source" style="margin-top:1rem">
<summary class="label-text">Transcribe from a URL instead</summary>
<input id="parakeet-media" type="text" placeholder="Media or HLS (.m3u8) URL" class="input input-bordered w-full max-w-xs" />
<span style="display:block; padding:6px 0 0; font-size:80%; opacity:0.7" class="label-text">The source must allow cross-origin access (CORS).</span>
</details>
<hr class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-50 dark:border-neutral-200" />
</div>
<div class="form-text" style="font-size: 90%;">
<p style="padding-top:8px">Parakeet TDT v3 runs entirely in your browser — no token, nothing uploaded.</p>
<p>The model downloads once and is cached (~650 MB on CPU, ~1.2 GB on GPU). Multilingual — the language is detected automatically.</p>
<p>Runs on your GPU when available — a GPU browser (Chrome or Safari) is recommended. Without WebGPU (e.g. Firefox) it falls back to the CPU and is several times slower.</p>
<p id="parakeet-device" style="opacity:0.7"></p>
</div>
<div class="modal-action">
<label id="parakeet-form-submit-btn" for="transcribe-modal" class="btn btn-primary btn-disabled" aria-disabled="true">TRANSCRIBE</label>
</div>
</form>
</template>
<template id="caption-template-holder">
<div id="caption-template" class="caption">
<div class="caption-row caption-row-top">
<button class="play btn btn-primary btn-sm" onclick="playClip(this)">play clip <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg></button>
<button type="button" class="caption-rate" title=""></button>
</div>
<div class="caption-row">
<button class="play-start btn btn-outline btn-xs" onclick="seekTo(this)" style="margin-right:4px"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-skip-forward"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" x2="19" y1="5" y2="19"></line></svg></button><input class="start" value="" oninput="captionChange()">(In)
</div>
<div class="caption-row">
<button class="play-end btn btn-outline btn-xs" onclick="seekTo(this)" style="margin-right:4px"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-skip-forward"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" x2="19" y1="5" y2="19"></line></svg></button><input class="end" value="" oninput="captionChange()">(Out)
</div>
<div class="caption-row">
<input class="line1" value="" oninput="captionChange()">
</div>
<div class="caption-row">
<input class="line2" value="" oninput="captionChange()">
</div>
<div class="caption-row btn-group btn-group-horizontal">
<button class="btn btn-outline btn-xs" onclick="addCaption(this)">insert <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-to-line"><line x1="12" x2="12" y1="17" y2="3"></line><polyline points="6 11 12 17 18 11"></polyline><path d="M19 21H5"></path></svg></button>
<button class="btn btn-outline btn-xs" onclick="mergeCaption(this)">merge <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-from-line"><line x1="12" x2="12" y1="21" y2="7"></line><polyline points="6 15 12 21 18 15"></polyline><path d="M19 3H5"></path></svg></button>
<button class="btn btn-outline btn-xs" onclick="deleteCaption(this)">delete <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-2"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg></button>
</div>
<div class="divider"></div>
</div>
</template>
<!-- end of templates -->
<!-- Dimmed backdrop behind the Recents drawer on small screens (#349) -->
<div id="drawer-backdrop"></div>
<div class="holder grid grid-flow-col auto-cols-max">
<div class="side-panel">
<div style="display:flex; flex-direction:column; height:100%;">
<div id="player-pane" class="top-bar-item" style="flex-shrink:0;">
<!-- example src -->
<div id="player-frame" style="position:relative;">
<video id="hyperplayer" class="hyperaudio-player" src="https://lab.hyperaud.io/audio/HLEintroAudio.mp3" type="audio/mpeg" poster="images/poster.png" style="width:100%; border-radius:0.5rem; display:block;">
<track id="hyperplayer-vtt" label="preview" kind="subtitles" src="">
</video>
<button id="media-play-overlay" type="button" aria-label="Play / pause" onclick="togglePlay()">
<span class="media-play-overlay-badge">
<svg id="media-overlay-play-icon" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><polygon points="6 3 20 12 6 21 6 3"/></svg>
<svg id="media-overlay-pause-icon" style="display:none" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>
</span>
</button>
</div>
<div id="player-controls">
<button id="pip-btn" type="button" class="btn btn-square btn-outline btn-sm tooltip" data-tip="Picture-in-picture" aria-label="Picture-in-picture" onclick="togglePictureInPicture()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-picture-in-picture-2"><path d="M21 9V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h4"/><rect width="10" height="7" x="12" y="13" rx="2"/></svg>
</button>
<button id="audio-only-btn" type="button" class="btn btn-square btn-outline btn-sm tooltip" data-tip="Audio only" aria-label="Toggle audio only" aria-pressed="false" onclick="toggleAudioOnly(this)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>
</button>
<!-- Settings (#615): a label-button, so a11y.js makes it keyboard-
operable and the CSS-only modal opens with no script. Here,
with the other icon buttons, rather than in the navbar (no
width to spare, #592) or beside Speakers/Timecodes, which are
the project's options, not the user's. -->
<label id="settings-btn" for="settings-modal" class="btn btn-square btn-outline btn-sm tooltip" data-tip="Settings" aria-label="Settings">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
</label>
<!-- margin-left:auto right-aligns the toggle pair in the space the
info button freed when it moved into the kebab menu (#456) -->
<label for="show-speakers" style="display:flex; align-items:center; gap:6px; margin-left:auto; cursor:pointer; white-space:nowrap;">
Speakers
<input type="checkbox" id="show-speakers" name="show-speakers" checked="checked" class="toggle toggle-primary"/>
</label>
<label for="show-timecodes" style="display:flex; align-items:center; gap:6px; margin-left:4px; cursor:pointer; white-space:nowrap;">
Timecodes
<input type="checkbox" id="show-timecodes" name="show-timecodes" class="toggle toggle-primary"/>
</label>
<!-- The Transcription-info button moved into each project row's
kebab menu (#456): info belongs to a particular project. -->
</div>
</div>
<div id="recents-pane" style="display:flex; flex-direction:column; flex:1 1 auto; min-height:0;">
<div id="side-notices"></div>
<!-- Project library (#456): rows over the OPFS index, rendered by
js/hyperaudio-library.js. The recents-* ids survive from the
pre-#451 Recents so its CSS and the mobile drawer apply as-is. -->
<div id="recents-card">
<h2 id="recents-title">Recents</h2>
<div id="recents-scroll">
<ul id="file-picker" class="menu menu-compact bg-base-100 w-full">
</ul>
</div>
</div>
</div>
<div style="position: absolute; bottom: 16px; ">
</div>
</div>
</div>
<div class="main-panel" style="z-index: 40">
<div class="navbar bg-base-100" style="background-color: #f5f5f5; min-height:70px;">
<div class="navbar-start">
<button id="sidebar-toggle" class="btn btn-square btn-ghost tooltip" data-tip="Toggle sidebar" style="margin-right:4px" aria-label="Toggle sidebar" aria-pressed="true">
<svg id="sidebar-close-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sidebar-close"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect><path d="M9 3v18"></path><path d="m16 15-3-3 3-3"></path></svg>
<svg id="sidebar-open-icon" style="display: none" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sidebar-open"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect><path d="M9 3v18"></path><path d="m14 9 3 3-3 3"></path></svg>
</button>
<div class="dropdown menu-compact">
<label tabindex="0" class="btn btn-outline gap-2" style="margin-right:4px; flex-wrap:nowrap;">
<span id="file-dropdown-text">FILE</span>
<svg id="file-dropdown-symbol" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>
<svg id="file-dropdown-symbol-mobile" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu"><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/></svg>
</label>
<!-- width set inline (not a Tailwind w-* class): the prebuilt/purged
tailwind-min.css only ships width utilities used at build time, so
an unbuilt class silently collapses the menu. Wide enough that the
longest indented submenu item stays on one line. -->
<ul id="file-dropdown" tabindex="0" class="dropdown-content menu p-2 shadow bg-base-100 rounded-box" style="width:20rem">
<li><a id="upload-transcribe-btn">Upload & Transcribe</a></li>
<li><a id="upload-align-btn">Add Transcript</a></li>
<hr
class="my-2 h-0 border border-t-0 border-solid border-neutral-700 opacity-25 dark:border-neutral-200" />
<!-- Long output/input lists live in inline-expanding submenus (DaisyUI
<details>) so the File menu stays short; ids/targets unchanged so
all wiring (download links, modal toggles, custom elements) still
works. Mirrors the Glider native File menu (#428). -->
<!-- Import is its own top-level category (#470): inputs sit
above outputs, mirroring Upload & Transcribe / Add
Transcript leading the menu. The former "Export / Import"
submenu split in two; ids/targets of the items unchanged so
all wiring still works. Project items (.hyperaudio) and the
transcript document exports are injected at the top of
their submenus by hyperaudio-save.js / transcript-doc-export.js. -->
<li>
<details id="file-import-submenu">
<summary>Import</summary>
<ul>
<li><import-json></import-json></li>
<li><import-ionosphere></import-ionosphere></li>
<li><import-whisper-json></import-whisper-json></li>
<li><label for="file-import-deepgram-json-dialog">Deepgram JSON</label></li>
<li><label for="file-import-srt-dialog">SRT</label></li>
<li><label for="file-import-vtt-dialog">VTT</label></li>
</ul>
</details>
</li>
<li>
<details id="file-export-submenu">
<summary>Export</summary>
<ul>
<li><export-json></export-json></li>
<li><export-ionosphere></export-ionosphere></li>
<li><publish-ionosphere></publish-ionosphere></li>
</ul>
</details>
</li>
<li>
<details id="file-download-submenu">
<summary>Download as</summary>
<ul>
<li><a id="download-vtt" href="" download="hyperaudio.vtt">WebVTT (Captions)</a></li>
<li><a id="download-vtt-words" href="" download="hyperaudio.words.vtt">WebVTT (Word-level / Karaoke)</a></li>
<li><a id="download-srt" href="" download="hyperaudio.srt">SRT (Captions)</a></li>
<li><a id="download-html" href="" download="hypertranscript.html">HTML</a></li>
<li><label id="download-hypertranscript" for="interactive-export-modal">Interactive Transcript</label></li>
<li><label for="export-modal">Media (WAV / MP3 / MP4…)</label></li>
</ul>
</details>
</li>
</ul>
</div>
<button id="strikethrough" class="btn btn-square btn-outline tooltip" data-tip="Strikethrough" style="margin-right:4px" aria-label="Strike through text">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-strikethrough"><path d="M16 4H9a3 3 0 0 0-2.83 4"/><path d="M14 12a4 4 0 0 1 0 8H6"/><line x1="4" x2="20" y1="12" y2="12"/></svg>
</button>
<label id="remove-gaps-btn" for="remove-gaps-modal" class="btn btn-square btn-outline relative tooltip" data-tip="Skip gaps between speech" style="margin-right:4px" aria-label="Remove gaps between speech">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rabbit"><path d="M13 16a3 3 0 0 1 2.24 5"/><path d="M18 12h.01"/><path d="M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3"/><path d="M20 8.54V4a2 2 0 1 0-4 0v3"/><path d="M7.612 12.524a3 3 0 1 0-1.6 4.3"/></svg>
<span id="remove-gaps-active-dot" style="display:none;position:absolute;top:4px;right:4px;width:9px;height:9px;border-radius:9999px;background-color:oklch(var(--p));z-index:2;pointer-events:none;"></span>
</label>
<!-- Transcript/captions view switch: a recessed track whose raised thumb
slides under the active segment (styles in hyperaudio-lite-editor.css).
The active view is marked by the thumb and aria-pressed, never by
disabled — disabled reads as "unavailable", not "current view".
editor-core.js keeps the state in sync. In the LEFT cluster with the
other view/editing controls (#423): what-am-I-looking-at on the left,
document-lifecycle actions on the right — the grouping the Glider
top bar reached independently (hyperaudio/glider#156). ids are a
programmatic contract (engines click #transcript-editor-btn). -->
<div id="view-switch" role="group" aria-label="Editor view">
<button id="transcript-editor-btn" class="btn btn-square tooltip" data-tip="Transcript view" aria-label="Transcript view" aria-pressed="true">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-text"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/></svg>
</button>
<button id="caption-editor-btn" class="btn btn-square tooltip" data-tip="Captions view" aria-label="Captions view" aria-pressed="false">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-subtitles"><path d="M7 13h4"></path><path d="M15 13h2"></path><path d="M7 9h2"></path><path d="M13 9h4"></path><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10Z"></path></svg>
</button>
</div>
<input type="checkbox" id="info-modal" class="modal-toggle" tabindex="-1" aria-hidden="true" />
<div class="modal">
<div class="modal-box relative">
<label for="info-modal" class="btn btn-sm btn-circle absolute right-2 top-2" aria-label="Close">✕</label>
<!-- Project info (#456): the name leads; uniform section labels
over plain rows follow. Media rows are set when the kebab's
Info opens the modal; #transcription-info is rebuilt per
project by hyperaudio-save; #summary/#topics are the LIVE
elements gather() reads — ids must not change. -->
<h3 id="project-info-name" class="text-lg font-bold"></h3>
<div class="info-section">
<h4 class="info-section-label">Media</h4>
<div id="project-info-media" class="info-rows"></div>
</div>
<div class="info-section">
<h4 class="info-section-label">Transcription</h4>
<div id="transcription-info" class="info-rows">
<p>Nothing transcribed yet – details of the service, model and processing time will appear here.</p>
</div>
</div>
<div class="info-section">
<h4 class="info-section-label">Summary</h4>
<p id="summary"></p>
</div>
<div class="info-section">
<h4 class="info-section-label">Topics</h4>
<p id="topics"></p>
</div>
<p id="app-version" style="margin-top:14px; font-size:75%; opacity:0.55; text-align:right"></p>
</div>
</div>
<!-- Settings (#615): the user's choices, not the project's. The rule
for what belongs here: if it travels in the .hyperaudio file
(Speakers, Timecodes, gap removal) it is a property of the
project and stays out. Playback leads because the gear sits in
the player's row; Application holds the escape hatches for
choices that could not otherwise be undone. Wired by
js/settings.js. -->
<input type="checkbox" id="settings-modal" class="modal-toggle" tabindex="-1" aria-hidden="true" />
<div class="modal">
<div class="modal-box relative" style="max-width:32rem">
<label for="settings-modal" class="btn btn-sm btn-circle absolute right-2 top-2" aria-label="Close">✕</label>
<h3 class="text-lg font-bold">Settings</h3>
<!-- Tabs: the same lifted-tab radios the Transcribe modal uses for
its engines, so Settings looks like the rest of the app. No
ARIA tab roles, for the reason given there — a radio group
announces correctly and brings its own keyboard. Application
leads because its rows, version, storage and the escape
hatches, are what someone opening Settings is usually after.
The panel is a fixed height so the modal does not jump as
tabs change, and scrolls when a tab outgrows it. -->
<div class="tabs tabs-lifted settings-tabs">
<input type="radio" name="settings-tab" id="settings-tab-application" class="tab" aria-label="Application" checked />
<div class="tab-content settings-panel bg-base-100 border-base-300 rounded-box" id="settings-panel-application">
<div class="settings-row">
<span class="settings-text">Version</span>
<span id="settings-app-version" class="settings-value"></span>
</div>
<div class="settings-row">
<span class="settings-text">
Storage
<span id="settings-storage" class="settings-hint">Measuring…</span>
</span>
</div>
<div class="settings-row settings-row-stack">
<span class="settings-text">
Downloaded models
<span id="settings-models-hint" class="settings-hint">Measuring…</span>
</span>
<ul id="settings-models" class="settings-models" aria-label="Downloaded models"></ul>
</div>
<div class="settings-row">
<span class="settings-text">
Warnings you asked not to see again
<span id="settings-undismiss-hint" class="settings-hint"></span>
</span>
<button type="button" id="settings-undismiss" class="btn btn-sm btn-outline">Show again</button>
</div>
<div class="settings-row">
<span class="settings-text">
API keys remembered by Transcribe
<span id="settings-forget-keys-hint" class="settings-hint"></span>
</span>
<button type="button" id="settings-forget-keys" class="btn btn-sm btn-outline">Forget</button>
</div>
<!-- shown only while something in the page is marked
data-experimental (js/experimental-features.js) -->
<label class="settings-row settings-row-toggle" for="setting-experimental" id="setting-experimental-row">
<span class="settings-text">
Experimental features
<span class="settings-hint">Features still being tested.</span>
<span class="settings-hint settings-hint-warning">Using experimental features may cause unexpected results, including slowing down or freezing the browser.</span>
</span>
<input type="checkbox" id="setting-experimental" class="toggle toggle-warning" />
</label>
<div class="settings-row">
<span class="settings-text">
Reset the editor
<span class="settings-hint">Removes every project and every remembered choice, and brings the intro back.</span>
</span>
<button type="button" id="settings-reset" class="btn btn-sm btn-outline btn-error">Reset…</button>
</div>
</div>
<input type="radio" name="settings-tab" id="settings-tab-captions" class="tab" aria-label="Captions" />
<div class="tab-content settings-panel bg-base-100 border-base-300 rounded-box" id="settings-panel-captions">
<label class="settings-row" for="setting-caption-rate">
<span class="settings-text">
Reading rate on each caption
<span class="settings-hint">Characters per second is the streaming convention, words per minute the broadcast one.</span>
</span>
<select id="setting-caption-rate" class="select select-bordered select-sm">
<option value="cps">Characters per second</option>
<option value="wpm">Words per minute</option>
<option value="none">None</option>
</select>
</label>
<label class="settings-row" for="setting-caption-max-cps">
<span class="settings-text">
Flag above (characters per second)
<span class="settings-hint">17 is the usual limit for English. Advisory only — nothing is blocked.</span>
</span>
<input id="setting-caption-max-cps" type="number" min="1" max="60" step="1" class="input input-bordered input-sm" style="width:6rem" />
</label>
<label class="settings-row" for="setting-caption-max-wpm">
<span class="settings-text">
Flag above (words per minute)
<span class="settings-hint">180 is the upper end of broadcast practice.</span>
</span>
<input id="setting-caption-max-wpm" type="number" min="20" max="400" step="5" class="input input-bordered input-sm" style="width:6rem" />
</label>
<label class="settings-row" for="setting-caption-line-length">
<span class="settings-text">
Characters per line
<span class="settings-hint">The longest a caption line may be when captions are generated. Applies to the next generation, so existing captions are left alone.</span>
</span>
<input id="setting-caption-line-length" type="number" min="16" max="80" step="1" class="input input-bordered input-sm" style="width:6rem" />
</label>
<label class="settings-row settings-row-toggle" for="setting-caption-paragraph-breaks">
<span class="settings-text">
Start a new caption at each new paragraph
<span class="settings-hint">Off, short sentences share a caption even across a paragraph break. A change of speaker always starts a new caption. Applies to the next generation.</span>
</span>
<input type="checkbox" id="setting-caption-paragraph-breaks" class="toggle toggle-primary" />
</label>
<label class="settings-row settings-row-toggle" for="setting-caption-colour-speakers">
<span class="settings-text">
Colour-code speakers in exported captions
<span class="settings-hint">The WebVTT and SRT downloads only. Chrome and Safari show the colours, Firefox does not, and SRT colour depends on the player.</span>
</span>
<input type="checkbox" id="setting-caption-colour-speakers" class="toggle toggle-primary" />
</label>
</div>
<input type="radio" name="settings-tab" id="settings-tab-playback" class="tab" aria-label="Playback" />
<div class="tab-content settings-panel bg-base-100 border-base-300 rounded-box" id="settings-panel-playback">
<label class="settings-row settings-row-toggle" for="setting-play-on-dblclick">
<span class="settings-text">
Double-click a word to play from it
<span class="settings-hint">Off: a double-click only moves the playhead there.</span>
</span>
<input type="checkbox" id="setting-play-on-dblclick" class="toggle toggle-primary" />
</label>
</div>
</div>
</div>
</div>
</div>
<div class="navbar-center">
<div id="find-replace" class="form-control">
<div id="find-row">
<div id="search-wrap">
<input id="search-box" type="text" placeholder="Search" class="input input-bordered" />
<button id="search-clear" type="button" class="btn btn-xs btn-ghost btn-circle" aria-label="Clear search" hidden>✕</button>
<div id="replace-panel" hidden>
<input id="replace-box" type="text" placeholder="Replace with…" class="input input-bordered input-sm" />
<div id="replace-actions">
<span id="find-match-count" aria-live="polite">0 / 0</span>
<button id="find-prev" type="button" class="btn btn-xs btn-ghost" aria-label="Previous match" title="Previous match">‹</button>
<button id="find-next" type="button" class="btn btn-xs btn-ghost" aria-label="Next match" title="Next match">›</button>
<span class="replace-spacer"></span>
<button id="replace-one" type="button" class="btn btn-xs">Replace</button>
<button id="replace-all" type="button" class="btn btn-xs btn-primary">All</button>
<button id="replace-close" type="button" class="btn btn-xs btn-ghost" aria-label="Close find and replace" title="Close">✕</button>
</div>
</div>
</div>
<button id="find-replace-toggle" type="button" class="btn btn-square btn-ghost btn-sm tooltip" data-tip="Find & replace" aria-label="Find and replace" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>
</button>
</div>
</div>
</div>
<div class="navbar-end" style="padding-right: 8px;">
<!--<label for="captions-modal" class="btn btn-outline gap-2" style="margin-right:4px">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-subtitles"><path d="M7 13h4"></path><path d="M15 13h2"></path><path d="M7 9h2"></path><path d="M13 9h4"></path><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10Z"></path></svg>
</label>-->
<input type="checkbox" id="captions-modal" class="modal-toggle" tabindex="-1" aria-hidden="true" />
<div class="modal" style="content-visibility: hidden;">
<div class="modal-box relative">
<label for="captions-modal" class="btn btn-sm btn-circle absolute right-2 top-2" aria-label="Close">✕</label>
<button id="regenerate-btn" class="btn btn-disabled btn-outline btn-primary">Re-generate Captions from Transcript <svg id="regenerate-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-restart"><path d="M21 6H3"></path><path d="M7 12H3"></path><path d="M7 18H3"></path><path d="M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14"></path><path d="M11 10v4h4"></path></svg></button>
<div id="caption-editor">
<center>Preparing captions....</center>
</div>
<!--<caption-service></caption-service>-->
</div>
</div>
<label id="export-media-btn" for="export-modal" class="btn btn-square btn-primary tooltip" data-tip="Export media" style="margin-right:4px" aria-label="Export media">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>
</label>
<label id="new-transcription-btn" for="transcribe-modal" class="btn btn-primary gap-2">
<span id="transcribe-label">NEW</span>
<span id="transcribe-label-mobile">NEW</span>
<svg id="transcribe-logo" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sticker"><path d="M15.5 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V8.5L15.5 3Z"></path><path d="M15 3v6h6"></path><path d="M10 16s.8 1 2 1c1.3 0 2-1 2-1"></path><path d="M8 13h0"></path><path d="M16 13h0"></path></svg>
</label>
</div>
</div>
</div>
<div class="transcript-holder">
<div id="hypertranscript" class="hyperaudio-transcript" contenteditable="true" data-intro-title="How to use the Editor">
<!-- example data -->
<article>
<section>
<p>
<span data-m="320" data-d="0" class="speaker">[Mark] </span>
<span data-m="320" data-d="80">The </span>
<span data-m="560" data-d="880">Hyperaudio </span>
<span data-m="1520" data-d="240">Lite </span>
<span data-m="1840" data-d="320">Editor </span>
<span data-m="2400" data-d="160">makes </span>
<span data-m="2640" data-d="320">audio </span>
<span data-m="2960" data-d="80">and </span>
<span data-m="3200" data-d="80">video </span>
<span data-m="3520" data-d="80">more </span>
<span data-m="3840" data-d="560">accessible </span>
<span data-m="4560" data-d="80">by </span>
<span data-m="4800" data-d="400">creating </span>
<span data-m="5360" data-d="320">captions </span>
<span data-m="5840" data-d="80">and </span>
<span data-m="6080" data-d="560">interactive </span>
<span data-m="6720" data-d="880">transcripts. </span>
</p>
<p>
<span data-m="8160" data-d="80">The </span>
<span data-m="8480" data-d="80">first </span>
<span data-m="8800" data-d="160">step </span>
<span data-m="9040" data-d="80">is </span>
<span data-m="9280" data-d="80">to </span>
<span data-m="9440" data-d="480">transcribe </span>
<span data-m="10080" data-d="80">your </span>
<span data-m="10320" data-d="400">content. </span>
</p>
<p>
<span data-m="11360" data-d="400">Choose </span>
<span data-m="11840" data-d="80">from </span>
<span data-m="12000" data-d="320">several </span>
<span data-m="12320" data-d="320">speech </span>
<span data-m="12800" data-d="80">to </span>
<span data-m="12960" data-d="240">text </span>
<span data-m="13280" data-d="320">engines. </span>
<span data-m="13920" data-d="80">On </span>
<span data-m="14160" data-d="240">device </span>
<span data-m="14480" data-d="320">there's </span>
<span data-m="14720" data-d="80">a </span>
<span data-m="14880" data-d="560">Parakeet </span>
<span data-m="15520" data-d="80">and </span>
<span data-m="15600" data-d="320">Whisper </span>
<span data-m="16160" data-d="80">model, </span>
<span data-m="16480" data-d="80">or </span>
<span data-m="16720" data-d="80">for </span>
<span data-m="16880" data-d="320">faster </span>
<span data-m="17280" data-d="400">processing </span>
<span data-m="17760" data-d="80">and </span>
<span data-m="17920" data-d="320">longer </span>
<span data-m="18320" data-d="320">content, </span>
<span data-m="18800" data-d="80">you </span>
<span data-m="18960" data-d="80">can </span>
<span data-m="19040" data-d="320">connect </span>
<span data-m="19360" data-d="80">to </span>
<span data-m="19600" data-d="480">Assembly </span>
<span data-m="20160" data-d="240">AI, </span>
<span data-m="20640" data-d="560">Deepgram, </span>
<span data-m="21440" data-d="80">or </span>
<span data-m="21600" data-d="80">to </span>
<span data-m="21760" data-d="560">Parakeet </span>
<span data-m="22560" data-d="80">in </span>
<span data-m="22640" data-d="80">the </span>
<span data-m="22800" data-d="560">cloud. </span>
</p>
<p>
<span data-m="24320" data-d="400">Once </span>
<span data-m="24880" data-d="560">transcribed, </span>
<span data-m="25520" data-d="80">you </span>
<span data-m="25680" data-d="80">can </span>
<span data-m="25760" data-d="400">correct </span>
<span data-m="26160" data-d="80">the </span>
<span data-m="26240" data-d="400">transcript </span>
<span data-m="26720" data-d="80">and </span>
<span data-m="26880" data-d="80">add </span>
<span data-m="27120" data-d="320">speaker </span>
<span data-m="27520" data-d="240">names. </span>
<span data-m="28000" data-d="240">Just </span>
<span data-m="28320" data-d="240">edit </span>
<span data-m="28640" data-d="80">the </span>
<span data-m="28720" data-d="400">transcript </span>
<span data-m="29200" data-d="80">like </span>
<span data-m="29360" data-d="80">you </span>
<span data-m="29520" data-d="80">would </span>
<span data-m="29680" data-d="80">any </span>
<span data-m="29920" data-d="80">other </span>
<span data-m="30080" data-d="160">text </span>
<span data-m="30320" data-d="80">and </span>
<span data-m="30480" data-d="320">we'll </span>
<span data-m="30800" data-d="80">look </span>
<span data-m="30960" data-d="160">after </span>
<span data-m="31200" data-d="80">the </span>
<span data-m="31440" data-d="400">timings. </span>
</p>
<p>
<span data-m="32960" data-d="560">Tidy </span>
<span data-m="33600" data-d="80">up </span>
<span data-m="33760" data-d="80">your </span>
<span data-m="33920" data-d="240">content, </span>
<span data-m="34320" data-d="320">strike </span>
<span data-m="34640" data-d="80">out </span>
<span data-m="34800" data-d="240">filler </span>
<span data-m="35280" data-d="240">words </span>
<span data-m="35600" data-d="80">or </span>
<span data-m="35680" data-d="80">any </span>
<span data-m="35840" data-d="400">unwanted </span>
<span data-m="36320" data-d="160">text </span>
<span data-m="36560" data-d="80">and </span>
<span data-m="36720" data-d="240">remove </span>
<span data-m="37040" data-d="320">gaps </span>
<span data-m="37440" data-d="80">and </span>
<span data-m="37600" data-d="560">silences, </span>
<span data-m="38400" data-d="80">all </span>
<span data-m="38640" data-d="160">while </span>
<span data-m="38880" data-d="80">the </span>
<span data-m="39040" data-d="320">timings </span>
<span data-m="39440" data-d="240">stay </span>
<span data-m="39760" data-d="400">perfectly </span>
<span data-m="40240" data-d="80">in </span>
<span data-m="40480" data-d="400">sync. </span>
</p>
<p>
<span data-m="41680" data-d="240">When </span>
<span data-m="42000" data-d="320">you're </span>
<span data-m="42320" data-d="240">happy </span>
<span data-m="42560" data-d="80">with </span>
<span data-m="42720" data-d="80">your </span>
<span data-m="42880" data-d="480">transcript, </span>
<span data-m="43600" data-d="160">check </span>
<span data-m="43840" data-d="80">your </span>
<span data-m="44000" data-d="240">captions </span>
<span data-m="44400" data-d="80">and </span>
<span data-m="44560" data-d="320">tweak </span>
<span data-m="45040" data-d="80">them </span>
<span data-m="45280" data-d="80">right </span>
<span data-m="45520" data-d="80">in </span>
<span data-m="45760" data-d="80">the </span>
<span data-m="46000" data-d="400">editor. </span>
</p>
<p>
<span data-m="47840" data-d="400">Finally, </span>
<span data-m="48720" data-d="320">export </span>
<span data-m="49200" data-d="80">in </span>
<span data-m="49360" data-d="80">a </span>
<span data-m="49440" data-d="160">number </span>
<span data-m="49600" data-d="80">of </span>
<span data-m="49680" data-d="320">formats </span>
<span data-m="50080" data-d="80">to </span>
<span data-m="50320" data-d="320">associate </span>
<span data-m="50720" data-d="80">with </span>
<span data-m="50880" data-d="80">your </span>
<span data-m="51040" data-d="720">audiovisual </span>
<span data-m="51760" data-d="320">media, </span>
<span data-m="52320" data-d="240">burn </span>
<span data-m="52560" data-d="240">in </span>
<span data-m="52880" data-d="240">captions </span>
<span data-m="53360" data-d="240">ready </span>
<span data-m="53600" data-d="80">for </span>
<span data-m="53840" data-d="80">social </span>
<span data-m="54080" data-d="240">media </span>
<span data-m="54480" data-d="80">use, </span>
<span data-m="54720" data-d="80">or </span>
<span data-m="54960" data-d="80">use </span>
<span data-m="55120" data-d="80">the </span>
<span data-m="55280" data-d="720">Hyperaudio </span>
<span data-m="56160" data-d="240">Lite </span>
<span data-m="56480" data-d="240">Library </span>
<span data-m="56880" data-d="80">or </span>
<span data-m="57120" data-d="480">WordPress </span>
<span data-m="57680" data-d="320">plugin </span>
<span data-m="58320" data-d="80">to </span>
<span data-m="58480" data-d="480">embed </span>
<span data-m="59120" data-d="560">interactive </span>
<span data-m="59760" data-d="560">transcripts </span>
<span data-m="60400" data-d="480">directly </span>
<span data-m="61040" data-d="80">into </span>
<span data-m="61280" data-d="80">your </span>
<span data-m="61600" data-d="720">website. </span>
</p>
</section>
</article>
</div>
</div>
<div id="playbar">
<button id="playbar-toggle" type="button" class="btn btn-square btn-sm btn-primary" aria-label="Play / pause" onclick="togglePlay()">
<svg id="playbar-play-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" stroke="none" class="lucide lucide-play"><polygon points="6 3 20 12 6 21 6 3"/></svg>
<svg id="playbar-pause-icon" style="display:none" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" stroke="none" class="lucide lucide-pause"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>
</button>
<input id="playbar-seek" type="range" min="0" max="1000" value="0" step="1" class="range range-xs range-primary" aria-label="Seek" />
<span id="playbar-time">0:00 / 0:00</span>
<button id="playbar-mute" type="button" class="btn btn-square btn-sm btn-ghost tooltip" data-tip="Mute" aria-label="Mute" onclick="toggleMute()">
<svg id="playbar-volume-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M15.54 8.46a5 5 0 0 1 0 7.07"/><path d="M19.07 4.93a10 10 0 0 1 0 14.14"/></svg>
<svg id="playbar-mute-icon" style="display:none" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-volume-x"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><line x1="22" x2="16" y1="9" y2="15"/><line x1="16" x2="22" y1="9" y2="15"/></svg>
</button>
<input id="playbar-volume" type="range" min="0" max="100" value="100" step="1" class="range range-xs range-primary" aria-label="Volume" />
<select id="playbar-rate" class="select select-bordered select-sm" aria-label="Playback rate" title="Playback rate">
<option value="2">2×</option>
<option value="1.7">1.7×</option>
<option value="1.5">1.5×</option>
<option value="1.2">1.2×</option>
<option value="1" selected>1×</option>
<option value="0.8">0.8×</option>
</select>
</div>
<!-- The "captions have been edited" notice lived here until #506 — it now
rides the shared #project-dialog chassis (hyperaudio-save.js). -->
</div>
<!-- Media export modal (#289/#291/#292) — wired by js/media-export.js -->
<input type="checkbox" id="export-modal" class="modal-toggle" tabindex="-1" aria-hidden="true" />
<div class="modal">
<div class="modal-box" style="max-width:26rem">
<label for="export-modal" class="btn btn-sm btn-circle absolute right-2 top-2" aria-label="Close">✕</label>
<h3 class="font-bold text-lg" style="margin-bottom:12px">Export media</h3>
<div style="display:flex; flex-direction:column; gap:8px; margin-bottom:14px">
<label style="display:flex; gap:10px; align-items:center; cursor:pointer">
<input type="radio" name="export-source" id="export-source-entire" class="radio radio-primary radio-sm" checked />
<span class="label-text">Entire media <span style="opacity:0.6; font-size:85%">(original audio or video file)</span></span>
</label>
<label style="display:flex; gap:10px; align-items:center; cursor:pointer">
<input type="radio" name="export-source" id="export-source-edited" class="radio radio-primary radio-sm" />
<span class="label-text">Edited media <span id="export-edit-summary" style="opacity:0.6; font-size:85%"></span></span>
</label>
<!-- A clip of the transcript selection (#689): shown only when text
was selected in the transcript before opening this dialog. -->
<label id="export-source-clip-row" style="display:none; gap:10px; align-items:center; cursor:pointer">
<input type="radio" name="export-source" id="export-source-clip" class="radio radio-primary radio-sm" />
<span class="label-text">Selection <span id="export-clip-summary" style="opacity:0.6; font-size:85%"></span></span>
</label>
<!-- Shown only when there is something to warn about (#608): with a
clean transcript both options produce the same media and this
would be noise. -->
<div id="export-source-note" style="display:none; font-size:85%; opacity:0.75; margin-top:2px"></div>
</div>
<label class="label-text" for="export-format">Format</label>
<select id="export-format" class="select select-bordered w-full" style="margin-top:4px"></select>
<label class="label-text" for="export-name" style="display:block; margin-top:14px">Save as</label>
<input id="export-name" type="text" class="input input-bordered w-full" style="margin-top:4px" placeholder="file name (no extension)" />
<div id="export-name-note" style="font-size:82%; opacity:0.7; margin-top:6px">All exported files use this name. The interactive transcript links the video by it — keep the downloads together in one folder.</div>
<!-- Where the result goes (#693): downloaded, or added to Recents as a
new project. Shown when the library is available and there is a
transcript to make a project of. -->
<div id="export-dest-row" style="display:none; margin-top:14px">