-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.html
1028 lines (965 loc) · 53.7 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>xVA Trainer</title>
</head>
<link rel="stylesheet" type="text/css" href="style.css">
<style id="cssHack">
::selection {
background: #ddd;
}
::-webkit-scrollbar-thumb {
background: rgba(204,204,204, 0.5) !important;
}
a {
color: rgb(204, 204, 204);
}
</style>
<body>
<div id="chromeBar">
<div id="dragBar">xVA Trainer</div>
<div id="chromeActions">
<div id="chromeMin">🗕</div>
<div id="chromeMax">🗖</div>
<div id="chromeQuit">✖</div>
</div>
</div>
<div id="appcontent">
<div id="left">
<div class="top" id="topLeft">
<div id="selectedGameDisplay">Datasets</div>
<button id="datasetsPathButton" class="svgButton" style="margin-right: 2px;"></button>
<button id="newDatasetButton" style="height: 30px;width: 30px;">+</button>
</div>
<div class="content">
<div id="voiceTypeContainer"></div>
</div>
</div>
<div id="right">
<!-- <div id="rightBG1"></div> -->
<div id="rightBG2" style="background: linear-gradient(0deg, rgba(128,128,128,1) 0px, rgba(0,0,0,0)), url('assets/other-ccc-x-Other.jpg');"></div>
<div id="topRight" class="top">
<span></span>
<div id="title">Select dataset</div>
<svg style="display:none;" id="cogButton" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
<path fill="black" stroke="white" stroke-width="3" d="M47.16,21.221l-5.91-0.966c-0.346-1.186-0.819-2.326-1.411-3.405l3.45-4.917c0.279-0.397,0.231-0.938-0.112-1.282 l-3.889-3.887c-0.347-0.346-0.893-0.391-1.291-0.104l-4.843,3.481c-1.089-0.602-2.239-1.08-3.432-1.427l-1.031-5.886 C28.607,2.35,28.192,2,27.706,2h-5.5c-0.49,0-0.908,0.355-0.987,0.839l-0.956,5.854c-1.2,0.345-2.352,0.818-3.437,1.412l-4.83-3.45 c-0.399-0.285-0.942-0.239-1.289,0.106L6.82,10.648c-0.343,0.343-0.391,0.883-0.112,1.28l3.399,4.863 c-0.605,1.095-1.087,2.254-1.438,3.46l-5.831,0.971c-0.482,0.08-0.836,0.498-0.836,0.986v5.5c0,0.485,0.348,0.9,0.825,0.985 l5.831,1.034c0.349,1.203,0.831,2.362,1.438,3.46l-3.441,4.813c-0.284,0.397-0.239,0.942,0.106,1.289l3.888,3.891 c0.343,0.343,0.884,0.391,1.281,0.112l4.87-3.411c1.093,0.601,2.248,1.078,3.445,1.424l0.976,5.861C21.3,47.647,21.717,48,22.206,48 h5.5c0.485,0,0.9-0.348,0.984-0.825l1.045-5.89c1.199-0.353,2.348-0.833,3.43-1.435l4.905,3.441 c0.398,0.281,0.938,0.232,1.282-0.111l3.888-3.891c0.346-0.347,0.391-0.894,0.104-1.292l-3.498-4.857 c0.593-1.08,1.064-2.222,1.407-3.408l5.918-1.039c0.479-0.084,0.827-0.5,0.827-0.985v-5.5C47.999,21.718,47.644,21.3,47.16,21.221z M25,32c-3.866,0-7-3.134-7-7c0-3.866,3.134-7,7-7s7,3.134,7,7C32,28.866,28.866,32,25,32z"></path>
</svg>
</div>
<div class="content">
<div id="batch_main" style="margin-left: 1vw;margin-right: 1vw;width: calc(98vw - 306px);">
<span id="batchDropZoneNote">Drag and drop .txt/.csv files here, or start new line</span>
<style id="outPathCSSHack" type="text/css">
#batchRecordsHeader > div:nth-child(3), #batchRecordsContainer > div > div:nth-child(3) {
min-width: 250px;
max-width: 250px;
}
</style>
<div id="batchRecordsHeader" style="display: none;z-index: 100;">
<div id="i18n_batchh_num">#</div>
<div id="i18n_batchh_game">Audio</div>
<div id="i18n_batchh_outpath">File name</div>
<div id="i18n_batchh_text">Text</div>
<div id="i18n_batchh_text">WER</div>
</div>
<div id="batchRecordsContainer">
</div>
</div>
<div>
<div style="height: 40px;width: calc(98vw - 306px);margin-left: 1vw;margin-right: 1vw;display: flex;justify-content: space-between;align-items: center;background: rgba(75,75,75,0.8);margin-top: 5px;">
<div id="datasetDuplicatesWarning" title="Duplicate file names found in the dataset. Click for more.">⚠</div>
<div id="totalRecords" style="margin-right: 5px; width: 265px;margin-left: 5px;color: white;"></div>
<div style="width: 260px">
<input id="fileNameSearch" class="fancySearchInput" style="font-size: 12pt;" placeholder="Search file names..">
</div>
<div style="flex-grow: 1">
<input id="transcriptSearch" class="fancySearchInput" style="font-size: 12pt;" placeholder="Search transcript...">
</div>
<div style="display: flex;width: 300px;align-items: center;justify-content: space-around;">
<div><button class="mainPageButton" id="paginationPrev" disabled>Previous</button></div>
<div style="display: flex;align-items: center;">
<div style="margin-left: 5px;">Page:</div>
<input class="mainPageButton" id="pageNum" type="number" min="1" step="1" disabled style="height: 25px;width: 50px;margin: 10px;">
<div id="ofTotalPages" style="width: 45px"></div>
<!-- <div id="total_pages" style="margin-right: 10px;"></div> -->
</div>
<div><button class="mainPageButton" id="paginationNext" disabled>Next</button></div>
</div>
</div>
</div>
<textarea id="textInput"></textarea>
<div id="wave_container" style="display: flex;justify-content: center;align-items: center;height: 75px;">
</div>
<div id="buttons_container" style="display: flex;justify-content: center;width: 300px;margin: auto;">
<button id="btn_record">Record (Ctrl d)</button>
<button style="display: none;margin-left: 10px;" id="btn_clearRecord">Clear</button>
</div>
<div id="outFileNameContainer">
<div>
Output file name:
</div>
<input id="outFileNameInput" type="text" placeholder="output file name">
</div>
<style type="text/css">
#keyboard_tips, #other_buttons, #bottomrow_buttons {
display: flex;
justify-content: center;
margin-top: 10px;
font-weight: bold;
}
#keyboard_tips>div, #other_buttons>div, #bottomrow_buttons>div {
display: flex;
align-items: center;
margin-right: 15px;
color: #222;
}
.key_elem{
background: #ccc;
padding: 5px;
margin: 2px;
color: white;
text-shadow: 0 0 2px black;
margin-right: 5px;
}
#outFileNameContainer {
display: flex;
justify-content: center;
align-items: center;
margin: 5px;
height: 25px;
font-weight: bold;
color: #222;
}
#outFileNameInput {
margin-left: 10px;
}
</style>
<div id="keyboard_tips">
<div>
<button class="mainPageButton" id="btn_delete" disabled>Delete (Ctrl x)</button>
</div>
<div>
<button class="mainPageButton" id="btn_play" disabled>Play (Ctrl f)</button>
</div>
<div>
<button class="mainPageButton" id="btn_save" disabled>Save (Ctrl s)</button>
</div>
<div>
<button class="mainPageButton" id="btn_moveup" disabled>Move Up (↑)</button>
</div>
<div>
<button class="mainPageButton" id="btn_movedown" disabled>Move Down (↓)</button>
</div>
<div>
<button class="mainPageButton" id="btn_newline" disabled>New line (Ctrl ↓)</button>
</div>
</div>
<div id="other_buttons">
<!-- <div>
<button class="mainPageButton" id="btn_preprocessAudioButton" disabled>Pre-process audio</button>
</div> -->
<div>
<button class="mainPageButton" id="btn_autotranscribe" disabled>Auto-transcribe</button>
</div>
<div>
<button class="mainPageButton" id="btn_preprocessTextButton" disabled>Pre-process text</button>
</div>
<div>
<button class="mainPageButton" id="btn_checkTextQualityBtn" disabled>Check text quality</button>
</div>
<div>
<button class="mainPageButton" id="btn_cleanAudioText" disabled>Clean audio/text</button>
</div>
</div>
<div id="bottomrow_buttons">
<div>
<button class="mainPageButton" id="btn_opendatasetfolder" disabled>Open</button>
</div>
<div id="addmissingmeta_btn_container" style="display: none">
<button id="btn_addmissingmeta" style="background: red">Add missing metadata</button>
</div>
<div id="editdatasetmeta_btn_container" style="display: none;">
<button id="btn_editdatasetmeta">Edit metadata</button>
</div>
<div>
<button class="mainPageButton" id="btn_deleteall" disabled>Delete data</button>
</div>
<div>
<button class="mainPageButton" id="btn_deletedataset" disabled>Delete dataset</button>
</div>
<div>
<button class="mainPageButton" id="btn_trainmodel" disabled>Train</button>
</div>
<div>
<button class="mainPageButton" id="btn_exportmodel" disabled>Export model</button>
</div>
</div>
</div>
</div>
<div id="duplicateDatasetContainer" style="display:none">
<div class="modal" style="height: 50vh;min-height: 500px;">
<h2>Duplicate lines found in your dataset</h2>
<div>
You need to make sure that all the text lines in your transcript point to unique files, otherwise the training will break. There were a total of <span id="totalDataDuplicates">0</span> lines found pointing to <span id="uniqueDataDuplicates">0</span> unique audio files.
</div>
<div style="margin-top: 10px">
<button id="btnShowAllDataDuplicates">Show all duplicates</button>
<button id="btnRemoveAllDataDuplicates">Remove all duplicates</button>
</div>
</div>
</div>
<div id="checkTextQualityContainer" style="display:none">
<div class="modal" style="height: 50vh;min-height: 500px;">
<h2>Check text transcript quality</h2>
<div>
Run automatic speech recognition (ASR) and check the quality of your transcript against it using Word Error Rate (WER). This will display a colour in the WER column in the main app, with green indicating small differences, and red indicating big differences.
</div>
<div style="margin-top: 10px">
<button id="checkTextQualityBtn">Check quality</button>
</div>
</div>
</div>
<div id="cleanAudioTextContainer" style="display:none">
<div class="modal" style="height: 50vh;min-height: 500px;">
<h2>Clean up text and audio data</h2>
<div>
Remove all audio with no associated transcript, and remove all text lines with no associated audio file.
</div>
<div style="margin-top: 10px">
<button id="cleanTextAudioRunBtn">Clean</button>
</div>
</div>
</div>
<div id="preprocessTextContainer" style="display:none">
<div class="modal" style="height: 40vh;min-height: 300px;">
<h2>Pre-process text</h2>
<div style="height: 100%" class="flexTable">
<div>
<div>Create a backup of the metadata.csv file</div>
<div>
<input id="prepTextBackup" type="checkbox" checked>
</div>
</div>
<div>
<div>Filter out blank lines</div>
<div>
<input id="prepTestFilterBlank" type="checkbox" checked>
</div>
</div>
<div>
<div>Filter out lines with the following characters (comma separated)</div>
<div>
<input id="prepTestFilterChars" type="checkbox" checked>
<input id="prepTestFilterCharsList" type="text" value="(,),[,],{,}">
</div>
</div>
<div>
<div>Filter out lines with duplicate file names (remove both)</div>
<div>
<input id="prepTestFilterDuplicates" type="checkbox" checked>
</div>
</div>
</div>
<div style="margin-top: 10px">
<div id="prepTextSpinner" class="spinner" style="display: none;margin-top: 10px;"></div>
</div>
<div style="margin-top: 10px">
<button id="prepTextStart">Start</button>
</div>
</div>
</div>
<div id="settingsContainer" style="display:none">
<div class="modal">
<h2 id="i18n_settings">Settings</h2>
<div id="settingsOptionsContainer" class="flexTable">
<div>
<div style="flex-direction: row;justify-content: flex-end;">
<span id="i18n_settings_curr_install">Current installation:</span>
<span id="settings_installation" style="margin-left: 5px;">CPU</span>
</div>
<div>
<button id="setting_change_installation">Change to CPU+GPU</button>
</div>
</div>
<div>
<div id="i18n_settings_arpabetPagination">Dataset records pagination size</div>
<div>
<input id="setting_paginationSize" type="number" value="200">
</div>
</div>
<div>
<div id="i18n_setting_outpathwidth">Out Path column width (px)</div>
<div>
<input id="setting_outpathwidth" type="number" min="100" step="1">
</div>
</div>
<div>
<div id="i18n_setting_microphone">Microphone</div>
<div>
<select id="setting_mic_selection">
</select>
</div>
</div>
<div>
<div>Microphone volume</div>
<div>
<div style="display: flex;align-items: center;justify-content: space-between;">
<div id="setting_micVolume_display">100%</div>
<input style="width:200px" id="setting_micVolume" type="range" min="0" max="100" step="1">
</div>
</div>
</div>
<div>
<div>Use background noise removal</div>
<div>
<input id="setting_doNoiseRemoval" type="checkbox" name="">
</div>
</div>
<div>
<div>Background noise</div>
<div>
<div style="width: 350px;display: flex;align-items: flex-end;justify-content: center;">
<button id="recordNoiseButton">Record noise</button>
<div id="noiseContainer" style="width: 200px;"></div>
</div>
</div>
</div>
<div>
<div>Noise removal strength (0.2-0.3 recommended)</div>
<div>
<input id="setting_noiseRemStrength" name="" placeholder="0.25" type="number" step=0.01 min=0 max=1>
</div>
</div>
<hr style="width:100%;display: none;">
<div style="display: none;"> <!-- WIP feature -->
<div>CUDA devices, comma separated (leave this as 0, if unsure)</div>
<div>
<input id="setting_cudaDevices" value="0">
</div>
</div>
<hr style="width:100%">
<div>
<div>Datasets location</div>
<div>
<input id="setting_datasets_input" name="">
</div>
</div>
</div>
<div id="resetBtnsContainer" style="width:100%;height: 30px;">
<button style="padding: 0px;" id="reset_settings_btn">Reset Settings</button>
</div>
<div id="app_version">v1.0.0</div>
</div>
</div>
<div id="toolsContainer" style="display:none">
<div class="modal" style="width: 72.5vw;height: 65vh;">
<h1>Tools</h1>
<div style="display:flex;width: 70vw;height: 70vh;">
<div id="toolsList" style="display: flex;flex-direction: column;background: rgb(75,75,75);height: 100%;width: 300px;overflow-y: auto;"></div>
<div style="width: calc(75vw - 275px);height: 100%;margin-left: 25px;">
<h3 id="toolNameElem">Select a tool from the menu on the left</h3>
<div id="toolContent" style="display:none;height: 100%;width: 100%;">
<div id="toolDescription"></div>
<div id="toolsInfo" style="height: 20px;margin-top: 40px;"></div>
<div id="toolsCurrentFile" style="height: 20px;"></div>
<div>
<button id="toolsOpenInput">Open input directory</button>
<button id="toolsOpenInput2">Open input directory 2</button>
<button id="toolsRunTool">Run tool</button>
<button id="toolsOpenOutput">Open output directory</button>
</div>
<div id="toolProgressInfo" style="height: 50px;display: flex;justify-content: center;align-items: center;">
</div>
<div id="toolsSpinner" class="spinner" style="display: none;"></div>
</div>
</div>
</div>
</div>
</div>
<div id="datasetMetaContainer" style="display: none">
<div class="modal" style="width: 40vw;height: 40vh;min-height: 700px;">
<h2 id="datasetMetaTitle">New dataset</h2>
<div class="flexTable">
<div>
<div>Voice Name:</div>
<div>
<input id="datasetMeta_voiceName" value="Your voice name">
</div>
</div>
<div>
<div>Game ID</div>
<div>
<input id="datasetMeta_gameId" value="other">
</div>
</div>
<div>
<div>Game code</div>
<div>
<input id="datasetMeta_gameIdCode" value="x">
</div>
</div>
<div>
<div style="width: 40vw;margin-left: 5vw;">Game code follows the naming convention for xVASynth's app name for different games. Eg Skyrim is sk (SKVASynth), Fallout 4 is f4 (F4VASynth), Oblivion is OB (OBVASynth), and so on. You <span style="color: red;display: contents;">MUST</span> use the correct code for your game. If the short game code is not a prefix in the voice_id, features in xVASynth will not work properly for that voice. "x" fits the "other" game category.</div>
</div>
<div></div>
<div>
<div>Voice ID</div>
<div>
<input id="datasetMeta_voiceId" value="your_voice_name">
</div>
</div>
<div style="font-size: 10pt;color: #999;">
<div>Composed ID:</div>
<div id="composedVoiceId">x_your_voice_name</div>
</div>
<div>
<div style="width: 40vw;margin-left: 5vw;">Note: editing the game code or voice ID won't change the folder or file names for your dataset, to avoid breaking things mid-training. Make sure you either put the right code/voice ID in at the start, or rename your final model files to match your new voice ID if you change these</div>
</div>
<div>
<div>Gender</div>
<div style="flex-direction: row;justify-content: space-evenly;">
<span>
<input id="datasetMeta_gender_male" type="checkbox" checked>
Male
</span>
<span>
<input id="datasetMeta_gender_female" type="checkbox">
Female
</span>
<span>
<input id="datasetMeta_gender_other" type="checkbox">
Other
</span>
</div>
</div>
<div>
<div>Language code</div>
<div>
<input id="datasetMeta_langcode" value="en">
</div>
</div>
<div>
<div>Model version</div>
<div>
<input id="datasetMeta_modelVersion" type="number" min=1 step=0.1 value=1>
</div>
</div>
<div>
<div>Author (your name)</div>
<div>
<input id="datasetMeta_author" placeholder="Optional">
</div>
</div>
<div>
<div style="display: flex;justify-content: flex-end;flex-direction: row;">
<a id="ccLink" href="#">License</a>
</div>
<div>
<input id="datasetMeta_license" placeholder="Optional - Eg CC BY">
</div>
</div>
</div>
<div id="datasetMetaFinishButtonContainer"></div>
</div>
</div>
<div id="exportModelContainer" style="display: none">
<div class="modal" style="width: 40vw;height: 30vh;min-height: 350px;">
<h2>Export model</h2>
<div class="flexTable">
<div>
<div>Model checkpoints directory:</div>
<div style="flex-direction: row;">
<input style="width: 75%;" id="modelExport_trainningDir" placeholder="The full output folder path specified for training">
<button id="modelExport_trainningDirBtn" class="svgButton"></button>
</div>
</div>
<div>
<div>Export output directory:</div>
<div style="flex-direction: row;">
<input style="width: 75%;" id="modelExport_outputDir" placeholder="Where do you want the model to be exported to?">
<button id="modelExport_outputDirBtn" class="svgButton"></button>
</div>
</div>
</div>
<div>
<button id="exportSubmitButton">Export</button>
</div>
</div>
</div>
<style type="text/css">
#toolsList > button {
display: flex;
justify-content: center;
align-items: center;
padding: 3px;
}
.smallButton {
font-size: 10pt;
margin-top: -2px !important;
padding-top: 1px;
padding-bottom: 1px;
min-height: 0px;
}
#trainContainer > div > div > div > h3 {
text-align: left;
padding-left: 25px;
}
#trainingQueueContainer {
/*height: 100%;*/
flex-grow: 1;
width: 100%;
/*background: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px), linear-gradient(0deg, #444 0, rgba(0,0,0,0)), gray;*/
background: rgb(75,75,75);
}
#trainingQueuePanelContainer {
height: 75vh;
background: rgb(75,75,75);
overflow-x: auto;
}
#lossPlotsContainer {
display: flex;
height: 35vh;
width: 95%;
}
#lossPlotsContainer > div {
width: 50%;
}
#cmdPanel {
width: calc(95% - 10px);
margin: auto;
/*height: 30vh;*/
padding: 5px;
height: calc(75vh - 35vh - 35px - 10px);
background: rgba(0,0,0,0.3);
color: rgba(255,255,255,0.8);
overflow: auto;
text-align: left;
font-size: 9pt;
line-height: 20px;
}
#trainingQueueHeader {
position: sticky;
top: 0;
width: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
}
#trainingQueueHeader > div {
padding: 2px;
border: 1px solid;
color: white;
flex-grow: 1;
height: 20px;
text-overflow: ellipsis;
background-color: rgb(75,75,75);
box-shadow: 0 1px 5px 1px rgba(0,0,0,0.3);
text-shadow: 0 0 2px black;
font-weight: bold;
}
#trainingQueueHeader > div, #pluginsRecordsContainer > div {
height: 20px;
display: flex;
justify-content: center;
align-items: center;
background: #888;
}
#trainingQueueRecordsContainer > div {
width: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
}
#trainingQueueRecordsContainer > div > div {
padding: 2px;
border: 1px solid;
color: white;
flex-grow: 1;
height: 20px;
text-overflow: ellipsis;
}
#trainingQueueRecordsContainer > div > div:first-child {
display: flex;
justify-content: center;
align-items: center;
}
#trainingQueueHeader > div:first-child, #trainingQueueRecordsContainer > div > div:first-child {
min-width: 30px;
max-width: 30px;
}
#trainingQueueHeader > div:nth-child(2), #trainingQueueRecordsContainer > div > div:nth-child(2) {
min-width: 60px;
max-width: 60px;
}
#trainingQueueHeader > div:nth-child(3), #trainingQueueRecordsContainer > div > div:nth-child(3) {
min-width: 75px;
max-width: 75px;
}
#trainingQueueHeader > div:nth-child(4), #trainingQueueRecordsContainer > div > div:nth-child(4) {
min-width: 100px;
/*max-width: 100px;*/
}
#pluginsRecordsContainer > div {
cursor: pointer;
}
#trainingSystemCharts {
/*height: calc(70vh + 50px);*/
height: calc(70vh);
}
#trainingSystemCharts > div {
margin-bottom: 7px;
}
</style>
<!-- Queue config menu -->
<div id="queueItemConfigModalContainer" style="display: none;z-index: 1000;" >
<div class="modal" style="width: 300px;min-height: 625px;height: 625px;min-width: 850px">
<h2>Config</h2>
<div class="flexTable">
<div>
<div>Force stage</div>
<div style="display: flex;flex-direction: row;">
<input style="width: 50px;" id="trainingAddConfigDoForceStageCkbx" type="checkbox">
<select style="width: 100px;margin-right: 50px;" id="trainingAddConfigForceStageNumberSelect">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<!-- <option value="4">4</option>
<option value="5">5</option> -->
</select>
</div>
</div>
<hr style="opacity: 0.2;margin: 0;">
<div style="color: gray;display: flex;justify-content: center;">Path configs</div>
<hr style="opacity: 0.2;margin: 0;">
<div>
<div>Dataset path (where the metadata.csv file is)</div>
<div style="flex-direction: row;">
<input style="width: 75%;" id="trainingAddConfigDatasetPathInput">
<button id="trainingAddConfigDatasetPathInputBtn" class="svgButton"></button>
</div>
</div>
<div>
<div>Output path</div>
<div style="flex-direction: row;">
<input style="width: 75%;" id="trainingAddConfigOutputPathInput">
<button id="trainingAddConfigOutputPathInputBtn" class="svgButton"></button>
</div>
</div>
<br>
<div>
<div>xVAPitch Checkpoint path to fine-tune from<br>(built in, or custom)</div>
<div>
<div>
<input id="xvapitch_ckpt_option_base" type="radio" name="xvapitch_ckpt_option" value="xvapitch_ckpt_option_base" selected>
<label for="xvapitch_ckpt_option_base">Base v3</label>
<input id="xvapitch_ckpt_option_other" type="radio" name="xvapitch_ckpt_option" value="xvapitch_ckpt_option_other">
<label for="xvapitch_ckpt_option_other">Custom</label>
</div>
<div style="flex-direction: row;width: 95%;display: flex;align-items: center;justify-content: center;">
<input style="width: 80%;" id="trainingAddConfigCkptPathInput" placeholder="Full filepath to own ~500Mb .pt file" disabled>
<button id="trainingAddConfigCkptPathInputBtn" class="svgButton"></button>
</div>
</div>
</div>
<hr style="opacity: 0.2;margin: 0;">
<div style="color: gray;display: flex;justify-content: center;">Train configs</div>
<hr style="opacity: 0.2;margin: 0;">
<div style="height: 60px;">
<div style="align-items: center;">
<span style="margin-bottom: 5px">Back up model every x checkpoints</span>
<span style="font-size: 10pt;color: gray;">Be careful to have plenty of empty disk space (20GB+)</span>
</div>
<div>
<input id="trainingAddConfigBackupEveryXInput" type="number" value="3" min="1">
</div>
</div>
<div style="height: 60px;">
<div style="align-items: center;">
<span style="margin-bottom: 5px">Base batch size</span>
<span style="font-size: 10pt;color: gray;">(6 for a GPU with 6GB of VRAM, 24 for 24GB, etc)</span>
</div>
<div>
<input id="trainingAddConfigBatchSizeInput" type="number" value="8" min="1">
</div>
</div>
<div>
<div>Voice Language</div>
<div>
<select id="trainingConfigLangDropdown"></select>
</div>
</div>
<div>
<div>Use FP16 (amp) - turn off if loss is NaN</div>
<div>
<input id="trainingAddConfigUseAmp" type="checkbox" checked="true">
</div>
</div>
<div>
<div>Number of CPU workers - Leave as is.<br>If training is stuck after "Workers: x", lower the value</div>
<div>
<input id="trainingAddConfigWorkersInput" type="number" value="3" min="0">
</div>
</div>
</div>
<div>
<button id="acceptConfig">Accept</button>
<button id="cancelConfig">Cancel</button>
</div>
</div>
</div>
<div id="trainContainer" style="display:none">
<div class="modal" style="height: 85vh;width: 96vw;min-height: 500px;">
<div style="display: flex;">
<!-- Queue -->
<div id="train_queueThird" style="width: 403px;display: flex;flex-direction: column;margin-left: 10px;height: 85vh;">
<h3 style="margin-top: 0;">Queue</h3>
<div id="trainingQueuePanelContainer">
<div id="trainingQueueHeader">
<div>#</div>
<div>Actions</div>
<div>Status</div>
<div>Dataset</div>
</div>
<div id="trainingQueueRecordsContainer"></div>
</div>
<div style="display: flex;justify-content: space-evenly;height: 40px;margin-top: 10px;flex-wrap: wrap;">
<button id="trainingQueueBtnMoveUp" style="margin-left: 0;" disabled="true">Up</button>
<button id="trainingQueueBtnMoveDown" disabled="true">Down</button>
<button id="trainingQueueBtnDelete" disabled="true">Delete</button>
<button id="trainingQueueBtnAdd">Add</button>
<button id="trainingQueueBtnClear">Clear</button>
<button id="trainingQueueBtnBatchTrain" style="margin-right: 0;">Batch train</button>
</div>
</div>
<!-- Training -->
<div id="train_trainingThird" style="width: calc(96vw - 715px);margin-left: 10px;">
<h3 id="training_title" style="margin-top: 0;">Training</h3>
<div id="lossPlotsContainer">
<div>
<canvas id="loss_plot"></canvas>
</div>
<div>
<canvas id="loss_delta_plot"></canvas>
</div>
</div>
<div style="display: flex;width: 95%;margin: auto;height: 20px;padding-bottom: 10px;padding-top: 5px;">
<div style="margin-right: 10px;">View:</div>
<div>
<select id="stage_select">
<option value="stage1">Stage 1</option>
<option value="stage2">Stage 2</option>
<option value="stage3">Stage 3</option>
</select>
</div>
<div style="display: flex;align-items: center;justify-content: space-between;width: 180px;">
<span style="margin-left: 20px;">Only latest</span>
<input id="graphs_only_latest_val" type="number" style="width: 40px;" value="50" min="1" step="1">
<input id="graphs_only_latest_chbx" type="checkbox" style="width: 20px;height: 20px;">
</div>
</div>
<div id="cmdPanel"></div>
<div style="display: flex;justify-content: center;height: 40px;margin-top: 10px;">
<button id="trainingStartBtn" disabled>Start</button>
<button id="trainingPauseBtn" style="display: none;">Pause</button>
<button id="trainingResumeBtn" style="display: none;">Resume</button>
<button id="trainingStopBtn" style="display: none;">Stop</button>
<button id="trainingOpenCkpts" disabled>Open checkpoints</button>
</div>
</div>
<!-- System -->
<div id="train_systemThird" style="height: 85vh;width: 300px;display: flex;flex-direction: column;overflow-y: scroll;">
<h3 style="margin-top: 0;">System</h3>
<div>
<div id="trainingSystemCharts">
<div>
<canvas id="cpu_chart"></canvas>
</div>
<div>
<canvas id="ram_chart"></canvas>
</div>
<div>
<canvas id="cuda_chart"></canvas>
</div>
<div>
<canvas id="vram_chart"></canvas>
</div>
<div>
<canvas id="disk_chart"></canvas>
</div>
<div style="display: flex;justify-content: flex-end;height: 40px;margin-top: 10px;">
<div style="margin-right: 10px">Drive:</div>
<div>
<select id="disk_drive_select"></select>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="updatesContainer" style="display:none">
<div class="modal">
<div id="updatesVersions">This app version: 1.0.0</div>
<div id="i18n_updateslog">Updates log:</div>
<div id="updatesLogList">
</div>
<button id="checkUpdates">Check for updates now</button>
</div>
</div>
<div id="modalContainer" style="display:none"></div>
<div id="infoContainer" style="display:none">
<div class="modal" style="min-height: 200px;height: 200px;">
<h2 id="i18n_appinfo">App info</h2>
<span>
<span id="i18n_appinfo_instr_1">For instructions on how to use the app, please watch</span>
<a id="youtubeLink" style="display:inline" href="#">this short video</a>
<span id="i18n_appinfo_instr_3">showcase on YouTube.</span>
</span>
<span>
<span id="i18n_appinfo_instr_4">You can also join the discord server </span>
<a id="discordLink" href="#">here</a><span>.</span>
</span>
</div>
</div>
<div id="patreonContainer" style="display:none">
<div class="modal">
<h2 id="i18n_support">Support</h2>
<span>Special thanks to the xVASynth Patreon supporters:</span>
<span id="creditsList" style="overflow-y: auto;width: 100%;"></span>
</div>
</div>
</div>
</div>
<div id="trainButton" title="Train">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1380" height="400" viewBox="0 0 1380.000000 400.000000" version="1.1">
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
fill="#ffffff" stroke="none">
<path d="M425 5105 c-60 -22 -110 -68 -139 -127 l-26 -52 0 -2366 0 -2366 26
-52 c31 -63 81 -106 148 -128 72 -24 141 -14 229 34 40 21 974 546 2077 1166
1250 703 2019 1142 2043 1164 54 53 77 106 77 182 0 76 -23 129 -77 182 -24
22 -793 461 -2043 1164 -1103 620 -2038 1145 -2078 1167 -86 46 -168 57 -237
32z"/>
</g>
</svg>
</div>
<div id="toolsIcon" title="Tools">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="240.000000pt" height="240.000000pt" viewBox="0 0 240.000000 240.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,240.000000) scale(0.100000,-0.100000)"
fill="#ffffff" stroke="none">
<path d="M511 2390 c-24 -5 -46 -12 -49 -15 -4 -3 79 -91 182 -194 l189 -189
-6 -55 c-17 -164 -199 -347 -362 -364 l-57 -6 -189 189 c-103 103 -191 186
-194 183 -14 -15 -27 -133 -22 -207 7 -101 48 -226 101 -304 82 -125 226 -227
371 -263 33 -8 115 -17 181 -18 197 -6 151 29 769 -587 526 -525 530 -528 589
-545 232 -67 438 139 371 371 -17 59 -20 63 -545 589 -616 618 -581 572 -587
769 -1 66 -10 148 -18 181 -68 270 -304 460 -584 471 -53 2 -116 -1 -140 -6z"/>
</g>
</svg>
</div>
<div id="updatesIcon" title="Changelog">
<svg id="update_nothing" version="1.0" xmlns="http://www.w3.org/2000/svg"
width="25.000000pt" height="25.000000pt" viewBox="0 0 250.000000 344.000000"
preserveAspectRatio="xMidYMid meet"><g transform="translate(300.000000,344.000000) scale(0.100000,-0.100000) rotate(90 0 0)"
fill="#ffffff" stroke="none"><path d="M2150 2507 l0 -357 -875 0 c-950 0 -901 3 -955 -55 l-25 -27 0 -348
0 -348 25 -27 c54 -58 5 -55 955 -55 l875 0 0 -357 0 -358 572 573 573 572
-573 572 -572 573 0 -358z"/></g></svg>
<svg id="update_something" style="display: none;margin-left: -15px;}" version="1.0" xmlns="http://www.w3.org/2000/svg"
width="50.000000pt" height="25.000000pt" viewBox="0 0 250.000000 344.000000"
preserveAspectRatio="xMidYMid meet"><g transform="translate(300.000000,344.000000) scale(0.100000,-0.100000) rotate(90 0 0)"
fill="#ff9800" stroke="none"><path d="M2150 2507 l0 -357 -875 0 c-950 0 -901 3 -955 -55 l-25 -27 0 -348
0 -348 25 -27 c54 -58 5 -55 955 -55 l875 0 0 -357 0 -358 572 573 573 572
-573 572 -572 573 0 -358z"/></g></svg>
</div>
<div id="infoIcon" title="Info" style="filter: drop-shadow( 3px 3px 2px rgba(0, 0, 0, .7));">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1024.000000pt" height="1024.000000pt" viewBox="0 0 1024.000000 1024.000000" preserveAspectRatio="xMidYMid meet"><g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)" fill="#ffffff" stroke="none"><path d="M4920 9273 c-776 -41 -1504 -285 -2137 -715 -72 -49 -192 -137 -265 -196 -171 -136 -504 -469 -640 -639 -514 -646 -816 -1390 -899 -2218 -16 -155 -16 -615 0 -770 84 -830 387 -1575 905 -2225 131 -164 467 -499 634 -632 962 -766 2166 -1066 3378 -843 652 121 1287 413 1824 841 174 138 506 470 644 644 794 997 1091 2288 810 3525 -267 1174 -1048 2190 -2119 2756 -644 340 -1416 511 -2135 472z m640 -658 c708 -97 1329 -373 1855 -825 128 -110 355 -346 458 -475 851 -1069 1008 -2537 403 -3755 -182 -365 -370 -625 -670 -926 -233 -232 -422 -382 -676 -535 -1022 -614 -2304 -665 -3370 -135 -344 172 -619 367 -894 636 -268 262 -450 500 -629 821 -218 390 -358 827 -419 1309 -17 140 -17 640 0 780 103 811 427 1495 977 2059 266 272 502 454 826 634 390 218 862 369 1304 416 55 6 118 13 140 15 96 10 585 -4 695 -19z"/> <path d="M4960 7674 c-143 -24 -221 -54 -321 -120 -146 -97 -256 -255 -300 -434 -17 -70 -17 -248 0 -320 65 -268 273 -475 541 -541 71 -17 249 -17 320 0 285 70 495 293 545 580 19 105 19 137 0 242 -49 281 -253 503 -526 574 -59 15 -214 27 -259 19z"/> <path d="M4870 5724 c-476 -18 -902 -33 -947 -33 l-83 -1 0 -160 0 -160 203 0 c212 0 290 -11 366 -49 50 -26 98 -82 111 -130 7 -27 10 -369 8 -1083 -3 -1040 -3 -1043 -24 -1089 -23 -49 -67 -88 -124 -109 -23 -9 -109 -15 -257 -18 l-223 -4 0 -164 0 -164 1250 0 1250 0 0 164 0 164 -197 5 c-225 5 -281 17 -342 73 -26 23 -42 48 -50 79 -8 31 -11 430 -11 1379 l0 1336 -32 -1 c-18 -1 -422 -17 -898 -35z"/> </g> </svg>
</div>
<div id="patreonIcon" title="Patreon">
<img src="./assets/patreon.png" style="filter: drop-shadow( 3px 3px 2px rgba(0, 0, 0, .7));">
</div>
<div id="settingsCog" title="Settings">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="1280.000000pt" height="1280.000000pt" viewBox="0 0 1280.000000 1280.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
fill="#ffffff" stroke="none">
<path d="M6010 12794 c-25 -2 -103 -9 -175 -15 -143 -12 -390 -49 -503 -74
l-72 -17 0 -529 0 -530 -139 -207 c-158 -234 -272 -376 -371 -461 -174 -150
-329 -225 -570 -277 -67 -15 -129 -18 -290 -18 -216 0 -338 13 -540 59 l-103
23 -366 366 -367 367 -139 -112 c-409 -327 -760 -689 -1070 -1102 l-58 -78
355 -357 356 -357 40 -105 c99 -258 137 -439 137 -655 0 -152 -9 -214 -47
-339 -97 -315 -393 -608 -871 -861 l-104 -55 -510 0 c-437 0 -512 -2 -516 -14
-10 -26 -55 -336 -69 -471 -8 -82 -13 -266 -12 -495 0 -373 10 -553 54 -954
11 -99 20 -183 20 -188 0 -4 227 -8 504 -8 l503 0 84 -34 c417 -169 661 -374
800 -672 141 -299 140 -732 -2 -1218 l-21 -71 -356 -357 -356 -357 27 -40 c45
-68 219 -281 350 -427 251 -282 517 -537 771 -740 l130 -105 371 371 371 370
79 10 c142 17 511 23 645 11 434 -40 741 -184 989 -464 75 -86 193 -261 250
-373 l41 -81 0 -525 0 -525 103 -16 c144 -23 406 -54 577 -69 189 -17 765 -16
935 0 137 14 468 59 498 68 16 5 17 39 17 538 l0 532 46 95 c141 290 366 525
634 659 117 59 291 114 445 141 113 20 164 23 385 24 154 0 302 -5 375 -14
l120 -13 397 -400 398 -401 37 29 c85 63 356 286 468 384 302 265 573 556 755
813 l34 48 -397 397 -397 397 -34 170 c-59 293 -70 384 -70 585 -1 143 4 204
18 270 48 220 136 387 291 549 142 149 293 255 533 375 l132 66 575 0 575 0 5
23 c7 35 34 248 50 407 52 515 43 1075 -26 1529 -11 75 -22 144 -25 154 -5 16
-42 17 -589 17 l-584 0 -128 64 c-540 271 -784 609 -818 1136 -10 155 22 485
75 760 l10 55 405 405 405 405 -64 93 c-205 303 -507 614 -872 897 -182 143
-372 278 -382 273 -5 -1 -184 -174 -396 -383 -279 -274 -397 -384 -424 -393
-20 -8 -100 -27 -177 -43 -747 -155 -1306 99 -1725 786 l-60 99 0 553 c0 455
-2 553 -13 553 -8 0 -94 9 -193 20 -364 40 -536 51 -829 54 -165 2 -320 2
-345 0z m725 -4200 c242 -29 482 -102 720 -219 252 -124 440 -260 636 -461
291 -300 495 -679 589 -1095 65 -289 67 -678 4 -964 -181 -817 -764 -1463
-1548 -1714 -241 -77 -425 -105 -691 -105 -372 0 -669 68 -1000 229 -332 161
-616 393 -826 675 -113 152 -159 227 -239 392 -117 239 -193 507 -221 777 -16
153 -6 431 20 586 123 727 562 1329 1214 1665 420 217 856 293 1342 234z"/>
</g>
</svg>
</div>
</body>
<script>
"use strict"
const {remote} = require("electron")
// createElem
"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.createElem=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=1;if(Number.isInteger(t[0])){if(!(t[0]>0))throw new Error("Element count must be larger than 0. Actual value: "+t[0]);n=t[0],t.shift()}else if(Number(t[0])===t[0]&&t[0]%1!=0)throw new Error("Floats are not supported for element count.");var o=t[0]?t[0]:"div";if(t.shift(),"string"!=typeof o)throw new Error("Tag name must be a string");var a=document.createElement(o.replace(/(#.*)|(\..*)/g,"")),s=o.match(/#(?:(?![#\.]).)*/),c=o.match(/\.(?:(?![#\.]).)*/g);if(s&&(a.id=s[0].substr(1,s[0].length)),c&&(a.className=c.map(function(e){return e.substr(1,e.length)}).join(" ")),t.length)if("string"==typeof t[0])a.innerHTML=t[0],t.shift();else if(!(Object(t[0])!==t[0]||t[0]instanceof HTMLElement||Array.isArray(t[0]))){for(var i in t[0])!function(){switch(i){case"class":a.className=t[0].class;break;case"style":var e=t[0].style;if(null!=e&&void 0!=e&&e.constructor===Object)a.style.cssText=Object.keys(e).map(function(t){return t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()})+":"+("number"==typeof e[t]?e[t]+"px":e[t])}).join(";");else{if("string"!=typeof e)throw new Error("Style value must be either object or string.");a.style.cssText=e}break;case"events":Object.keys(t[0].events).forEach(function(e){var r=t[0].events[e];Array.isArray(r)?r.forEach(function(t){return a.addEventListener(e,t)}):"function"==typeof r&&a.addEventListener(e,r)});break;default:a.setAttribute(i,t[0][i])}}();t.shift()}var u=function e(t){switch(!0){case t instanceof HTMLElement:a.appendChild(t);break;case Array.isArray(t):t.forEach(e);break;case!!t&&t.constructor===Object:throw new Error("Multiple attributes objects not supported");default:null!=t&&console.warn("Unsupported parameter. Type: "+(void 0===t?"undefined":_typeof(t))+" Value:",t)}};return t.forEach(u),n>1?[].concat(_toConsumableArray(new Array(n))).map(function(e){return a.cloneNode()}):a};
// Chrome
chromeMin.addEventListener("click", () => remote.getCurrentWindow().minimize())
chromeMax.addEventListener("click", () => {
const w = remote.getCurrentWindow()
w.isMaximized() ? w.unmaximize() : w.maximize()
})
chromeQuit.addEventListener("click", () => {
const isTraining = trainingStartBtn.style.display == "none"
const doRest = () => {
doFetch(`http://localhost:8002/stopServer`, {
method: "Post",
body: JSON.stringify({})
}).then(r=>r.text()).then(() => {
try {
window.pythonProcess.kill()
} catch (e) {}
remote.getCurrentWindow().close()