Anchor-annotator 0.3.3__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Anchor_annotator-0.3.3.dist-info → Anchor_annotator-0.5.0.dist-info}/METADATA +1 -1
- Anchor_annotator-0.5.0.dist-info/RECORD +22 -0
- anchor/_version.py +2 -2
- anchor/main.py +178 -62
- anchor/models.py +88 -54
- anchor/plot.py +316 -115
- anchor/resources_rc.py +6475 -4801
- anchor/settings.py +195 -95
- anchor/ui_error_dialog.py +15 -16
- anchor/ui_main_window.py +40 -612
- anchor/ui_preferences.py +75 -44
- anchor/undo.py +15 -5
- anchor/widgets.py +98 -132
- anchor/workers.py +29 -1
- Anchor_annotator-0.3.3.dist-info/RECORD +0 -22
- {Anchor_annotator-0.3.3.dist-info → Anchor_annotator-0.5.0.dist-info}/LICENSE +0 -0
- {Anchor_annotator-0.3.3.dist-info → Anchor_annotator-0.5.0.dist-info}/WHEEL +0 -0
- {Anchor_annotator-0.3.3.dist-info → Anchor_annotator-0.5.0.dist-info}/top_level.txt +0 -0
anchor/ui_preferences.py
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
################################################################################
|
4
4
|
## Form generated from reading UI file 'preferences.ui'
|
5
5
|
##
|
6
|
-
## Created by: Qt User Interface Compiler version 6.
|
6
|
+
## Created by: Qt User Interface Compiler version 6.2.2
|
7
7
|
##
|
8
8
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
9
9
|
################################################################################
|
@@ -82,10 +82,8 @@ class Ui_PreferencesDialog(object):
|
|
82
82
|
self.scrollArea_3.setWidgetResizable(True)
|
83
83
|
self.scrollAreaWidgetContents_3 = QWidget()
|
84
84
|
self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3")
|
85
|
-
self.scrollAreaWidgetContents_3.setGeometry(QRect(0, 0,
|
86
|
-
self.
|
87
|
-
self.verticalLayout_9.setObjectName("verticalLayout_9")
|
88
|
-
self.formLayout = QFormLayout()
|
85
|
+
self.scrollAreaWidgetContents_3.setGeometry(QRect(0, 0, 258, 322))
|
86
|
+
self.formLayout = QFormLayout(self.scrollAreaWidgetContents_3)
|
89
87
|
self.formLayout.setObjectName("formLayout")
|
90
88
|
self.autosaveLabel = QLabel(self.scrollAreaWidgetContents_3)
|
91
89
|
self.autosaveLabel.setObjectName("autosaveLabel")
|
@@ -117,80 +115,93 @@ class Ui_PreferencesDialog(object):
|
|
117
115
|
|
118
116
|
self.formLayout.setWidget(2, QFormLayout.FieldRole, self.audioDeviceEdit)
|
119
117
|
|
120
|
-
self.
|
121
|
-
self.
|
118
|
+
self.fadeInLabel = QLabel(self.scrollAreaWidgetContents_3)
|
119
|
+
self.fadeInLabel.setObjectName("fadeInLabel")
|
122
120
|
|
123
|
-
self.formLayout.setWidget(
|
121
|
+
self.formLayout.setWidget(3, QFormLayout.LabelRole, self.fadeInLabel)
|
124
122
|
|
125
|
-
self.
|
126
|
-
self.
|
123
|
+
self.enableFadeCheckBox = QCheckBox(self.scrollAreaWidgetContents_3)
|
124
|
+
self.enableFadeCheckBox.setObjectName("enableFadeCheckBox")
|
127
125
|
|
128
|
-
self.formLayout.setWidget(
|
126
|
+
self.formLayout.setWidget(3, QFormLayout.FieldRole, self.enableFadeCheckBox)
|
129
127
|
|
130
128
|
self.useCudaLabel = QLabel(self.scrollAreaWidgetContents_3)
|
131
129
|
self.useCudaLabel.setObjectName("useCudaLabel")
|
132
130
|
|
133
131
|
self.formLayout.setWidget(5, QFormLayout.LabelRole, self.useCudaLabel)
|
134
132
|
|
135
|
-
self.cudaCheckBox = QCheckBox(self.scrollAreaWidgetContents_3)
|
136
|
-
self.cudaCheckBox.setObjectName("cudaCheckBox")
|
137
|
-
|
138
|
-
self.formLayout.setWidget(5, QFormLayout.FieldRole, self.cudaCheckBox)
|
139
|
-
|
140
133
|
self.numJobsLabel = QLabel(self.scrollAreaWidgetContents_3)
|
141
134
|
self.numJobsLabel.setObjectName("numJobsLabel")
|
142
135
|
|
143
|
-
self.formLayout.setWidget(
|
136
|
+
self.formLayout.setWidget(7, QFormLayout.LabelRole, self.numJobsLabel)
|
144
137
|
|
145
138
|
self.numJobsEdit = QSpinBox(self.scrollAreaWidgetContents_3)
|
146
139
|
self.numJobsEdit.setObjectName("numJobsEdit")
|
147
140
|
|
148
|
-
self.formLayout.setWidget(
|
141
|
+
self.formLayout.setWidget(7, QFormLayout.FieldRole, self.numJobsEdit)
|
149
142
|
|
150
143
|
self.githubTokenLabel = QLabel(self.scrollAreaWidgetContents_3)
|
151
144
|
self.githubTokenLabel.setObjectName("githubTokenLabel")
|
152
145
|
|
153
|
-
self.formLayout.setWidget(
|
146
|
+
self.formLayout.setWidget(8, QFormLayout.LabelRole, self.githubTokenLabel)
|
154
147
|
|
155
148
|
self.githubTokenEdit = QLineEdit(self.scrollAreaWidgetContents_3)
|
156
149
|
self.githubTokenEdit.setObjectName("githubTokenEdit")
|
157
150
|
|
158
|
-
self.formLayout.setWidget(
|
151
|
+
self.formLayout.setWidget(8, QFormLayout.FieldRole, self.githubTokenEdit)
|
159
152
|
|
160
153
|
self.resultsPerPageLabel = QLabel(self.scrollAreaWidgetContents_3)
|
161
154
|
self.resultsPerPageLabel.setObjectName("resultsPerPageLabel")
|
162
155
|
|
163
|
-
self.formLayout.setWidget(
|
156
|
+
self.formLayout.setWidget(10, QFormLayout.LabelRole, self.resultsPerPageLabel)
|
164
157
|
|
165
158
|
self.resultsPerPageEdit = QSpinBox(self.scrollAreaWidgetContents_3)
|
166
159
|
self.resultsPerPageEdit.setObjectName("resultsPerPageEdit")
|
167
160
|
self.resultsPerPageEdit.setMaximum(1000)
|
168
161
|
|
169
|
-
self.formLayout.setWidget(
|
162
|
+
self.formLayout.setWidget(10, QFormLayout.FieldRole, self.resultsPerPageEdit)
|
170
163
|
|
171
164
|
self.timeDirectionLabel = QLabel(self.scrollAreaWidgetContents_3)
|
172
165
|
self.timeDirectionLabel.setObjectName("timeDirectionLabel")
|
173
166
|
|
174
|
-
self.formLayout.setWidget(
|
167
|
+
self.formLayout.setWidget(12, QFormLayout.LabelRole, self.timeDirectionLabel)
|
175
168
|
|
176
169
|
self.timeDirectionComboBox = QComboBox(self.scrollAreaWidgetContents_3)
|
177
170
|
self.timeDirectionComboBox.addItem("")
|
178
171
|
self.timeDirectionComboBox.addItem("")
|
179
172
|
self.timeDirectionComboBox.setObjectName("timeDirectionComboBox")
|
180
173
|
|
181
|
-
self.formLayout.setWidget(
|
174
|
+
self.formLayout.setWidget(12, QFormLayout.FieldRole, self.timeDirectionComboBox)
|
182
175
|
|
183
|
-
self.
|
184
|
-
self.
|
176
|
+
self.visibleSpeakerLabel = QLabel(self.scrollAreaWidgetContents_3)
|
177
|
+
self.visibleSpeakerLabel.setObjectName("visibleSpeakerLabel")
|
185
178
|
|
186
|
-
self.formLayout.setWidget(
|
179
|
+
self.formLayout.setWidget(13, QFormLayout.LabelRole, self.visibleSpeakerLabel)
|
180
|
+
|
181
|
+
self.visibleSpeakerComboBox = QComboBox(self.scrollAreaWidgetContents_3)
|
182
|
+
self.visibleSpeakerComboBox.addItem("")
|
183
|
+
self.visibleSpeakerComboBox.addItem("")
|
184
|
+
self.visibleSpeakerComboBox.addItem("")
|
185
|
+
self.visibleSpeakerComboBox.addItem("")
|
186
|
+
self.visibleSpeakerComboBox.addItem("")
|
187
|
+
self.visibleSpeakerComboBox.setObjectName("visibleSpeakerComboBox")
|
188
|
+
|
189
|
+
self.formLayout.setWidget(13, QFormLayout.FieldRole, self.visibleSpeakerComboBox)
|
190
|
+
|
191
|
+
self.cudaCheckBox = QCheckBox(self.scrollAreaWidgetContents_3)
|
192
|
+
self.cudaCheckBox.setObjectName("cudaCheckBox")
|
193
|
+
|
194
|
+
self.formLayout.setWidget(5, QFormLayout.FieldRole, self.cudaCheckBox)
|
195
|
+
|
196
|
+
self.useMpCheckBox = QCheckBox(self.scrollAreaWidgetContents_3)
|
197
|
+
self.useMpCheckBox.setObjectName("useMpCheckBox")
|
187
198
|
|
188
|
-
self.
|
189
|
-
self.label_25.setObjectName("label_25")
|
199
|
+
self.formLayout.setWidget(6, QFormLayout.FieldRole, self.useMpCheckBox)
|
190
200
|
|
191
|
-
self.
|
201
|
+
self.useMpLabel = QLabel(self.scrollAreaWidgetContents_3)
|
202
|
+
self.useMpLabel.setObjectName("useMpLabel")
|
192
203
|
|
193
|
-
self.
|
204
|
+
self.formLayout.setWidget(6, QFormLayout.LabelRole, self.useMpLabel)
|
194
205
|
|
195
206
|
self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3)
|
196
207
|
|
@@ -425,7 +436,7 @@ class Ui_PreferencesDialog(object):
|
|
425
436
|
self.scrollArea_2.setWidgetResizable(True)
|
426
437
|
self.scrollAreaWidgetContents_2 = QWidget()
|
427
438
|
self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2")
|
428
|
-
self.scrollAreaWidgetContents_2.setGeometry(QRect(0, 0,
|
439
|
+
self.scrollAreaWidgetContents_2.setGeometry(QRect(0, 0, 173, 410))
|
429
440
|
self.verticalLayout_7 = QVBoxLayout(self.scrollAreaWidgetContents_2)
|
430
441
|
self.verticalLayout_7.setObjectName("verticalLayout_7")
|
431
442
|
self.formLayout_2 = QFormLayout()
|
@@ -576,7 +587,7 @@ class Ui_PreferencesDialog(object):
|
|
576
587
|
self.scrollArea_4.setWidgetResizable(True)
|
577
588
|
self.scrollAreaWidgetContents_4 = QWidget()
|
578
589
|
self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4")
|
579
|
-
self.scrollAreaWidgetContents_4.setGeometry(QRect(0, 0,
|
590
|
+
self.scrollAreaWidgetContents_4.setGeometry(QRect(0, 0, 231, 228))
|
580
591
|
self.verticalLayout_11 = QVBoxLayout(self.scrollAreaWidgetContents_4)
|
581
592
|
self.verticalLayout_11.setObjectName("verticalLayout_11")
|
582
593
|
self.formLayout_6 = QFormLayout()
|
@@ -673,7 +684,7 @@ class Ui_PreferencesDialog(object):
|
|
673
684
|
self.scrollArea_5.setWidgetResizable(True)
|
674
685
|
self.scrollAreaWidgetContents_5 = QWidget()
|
675
686
|
self.scrollAreaWidgetContents_5.setObjectName("scrollAreaWidgetContents_5")
|
676
|
-
self.scrollAreaWidgetContents_5.setGeometry(QRect(0, 0,
|
687
|
+
self.scrollAreaWidgetContents_5.setGeometry(QRect(0, 0, 223, 250))
|
677
688
|
self.verticalLayout_13 = QVBoxLayout(self.scrollAreaWidgetContents_5)
|
678
689
|
self.verticalLayout_13.setObjectName("verticalLayout_13")
|
679
690
|
self.formLayout_7 = QFormLayout()
|
@@ -785,7 +796,8 @@ class Ui_PreferencesDialog(object):
|
|
785
796
|
self.buttonBox.accepted.connect(PreferencesDialog.accept)
|
786
797
|
self.buttonBox.rejected.connect(PreferencesDialog.reject)
|
787
798
|
|
788
|
-
self.tabWidget.setCurrentIndex(
|
799
|
+
self.tabWidget.setCurrentIndex(1)
|
800
|
+
self.visibleSpeakerComboBox.setCurrentIndex(1)
|
789
801
|
|
790
802
|
QMetaObject.connectSlotsByName(PreferencesDialog)
|
791
803
|
|
@@ -804,16 +816,15 @@ class Ui_PreferencesDialog(object):
|
|
804
816
|
self.audioDeviceLabel.setText(
|
805
817
|
QCoreApplication.translate("PreferencesDialog", "Audio device", None)
|
806
818
|
)
|
807
|
-
self.
|
808
|
-
QCoreApplication.translate("PreferencesDialog", "
|
819
|
+
self.fadeInLabel.setText(
|
820
|
+
QCoreApplication.translate("PreferencesDialog", "Fade in audio on play", None)
|
809
821
|
)
|
810
|
-
self.
|
822
|
+
self.enableFadeCheckBox.setText("")
|
811
823
|
self.useCudaLabel.setText(
|
812
824
|
QCoreApplication.translate("PreferencesDialog", "Use CUDA", None)
|
813
825
|
)
|
814
|
-
self.cudaCheckBox.setText("")
|
815
826
|
self.numJobsLabel.setText(
|
816
|
-
QCoreApplication.translate("PreferencesDialog", "Number of
|
827
|
+
QCoreApplication.translate("PreferencesDialog", "Number of MFA jobs", None)
|
817
828
|
)
|
818
829
|
self.githubTokenLabel.setText(
|
819
830
|
QCoreApplication.translate("PreferencesDialog", "Github request token", None)
|
@@ -831,9 +842,29 @@ class Ui_PreferencesDialog(object):
|
|
831
842
|
1, QCoreApplication.translate("PreferencesDialog", "Right-to-left", None)
|
832
843
|
)
|
833
844
|
|
834
|
-
self.
|
835
|
-
|
836
|
-
|
845
|
+
self.visibleSpeakerLabel.setText(
|
846
|
+
QCoreApplication.translate("PreferencesDialog", "Maximum visible speakers", None)
|
847
|
+
)
|
848
|
+
self.visibleSpeakerComboBox.setItemText(
|
849
|
+
0, QCoreApplication.translate("PreferencesDialog", "1", None)
|
850
|
+
)
|
851
|
+
self.visibleSpeakerComboBox.setItemText(
|
852
|
+
1, QCoreApplication.translate("PreferencesDialog", "2", None)
|
853
|
+
)
|
854
|
+
self.visibleSpeakerComboBox.setItemText(
|
855
|
+
2, QCoreApplication.translate("PreferencesDialog", "3", None)
|
856
|
+
)
|
857
|
+
self.visibleSpeakerComboBox.setItemText(
|
858
|
+
3, QCoreApplication.translate("PreferencesDialog", "4", None)
|
859
|
+
)
|
860
|
+
self.visibleSpeakerComboBox.setItemText(
|
861
|
+
4, QCoreApplication.translate("PreferencesDialog", "5", None)
|
862
|
+
)
|
863
|
+
|
864
|
+
self.cudaCheckBox.setText("")
|
865
|
+
self.useMpCheckBox.setText("")
|
866
|
+
self.useMpLabel.setText(
|
867
|
+
QCoreApplication.translate("PreferencesDialog", "Use multiprocessing?", None)
|
837
868
|
)
|
838
869
|
self.tabWidget.setTabText(
|
839
870
|
self.tabWidget.indexOf(self.generalTab),
|
@@ -844,7 +875,7 @@ class Ui_PreferencesDialog(object):
|
|
844
875
|
0, QCoreApplication.translate("PreferencesDialog", "MFA", None)
|
845
876
|
)
|
846
877
|
self.presetThemeEdit.setItemText(
|
847
|
-
1, QCoreApplication.translate("PreferencesDialog", "
|
878
|
+
1, QCoreApplication.translate("PreferencesDialog", "Native", None)
|
848
879
|
)
|
849
880
|
self.presetThemeEdit.setItemText(
|
850
881
|
2, QCoreApplication.translate("PreferencesDialog", "Custom", None)
|
anchor/undo.py
CHANGED
@@ -39,8 +39,11 @@ class CorpusCommand(QtGui.QUndoCommand):
|
|
39
39
|
|
40
40
|
def redo(self) -> None:
|
41
41
|
with self.corpus_model.edit_lock:
|
42
|
-
|
43
|
-
|
42
|
+
try:
|
43
|
+
self._redo(self.corpus_model.session)
|
44
|
+
self.corpus_model.session.commit()
|
45
|
+
except Exception:
|
46
|
+
self.corpus_model.session.rollback()
|
44
47
|
# while True:
|
45
48
|
# try:
|
46
49
|
# with self.corpus_model.session.begin_nested():
|
@@ -53,8 +56,11 @@ class CorpusCommand(QtGui.QUndoCommand):
|
|
53
56
|
|
54
57
|
def undo(self) -> None:
|
55
58
|
with self.corpus_model.edit_lock:
|
56
|
-
|
57
|
-
|
59
|
+
try:
|
60
|
+
self._undo(self.corpus_model.session)
|
61
|
+
self.corpus_model.session.commit()
|
62
|
+
except Exception:
|
63
|
+
self.corpus_model.session.rollback()
|
58
64
|
# while True:
|
59
65
|
# try:
|
60
66
|
# with self.corpus_model.session.begin_nested():
|
@@ -453,6 +459,11 @@ class UpdateUtteranceTextCommand(FileCommand):
|
|
453
459
|
self.new_text = other.new_text
|
454
460
|
return True
|
455
461
|
|
462
|
+
def update_data(self):
|
463
|
+
super().update_data()
|
464
|
+
self.corpus_model.changeCommandFired.emit()
|
465
|
+
self.corpus_model.update_utterance_table_row(self.utterance)
|
466
|
+
|
456
467
|
|
457
468
|
class ReplaceAllCommand(CorpusCommand):
|
458
469
|
def __init__(
|
@@ -662,7 +673,6 @@ class UpdateUtteranceSpeakerCommand(FileCommand):
|
|
662
673
|
self.corpus_model.change_speaker_table_utterances(self.utterances)
|
663
674
|
self.file_model.change_speaker_table_utterances(self.utterances)
|
664
675
|
self.corpus_model.changeCommandFired.emit()
|
665
|
-
self.corpus_model.update_data()
|
666
676
|
self.corpus_model.runFunction.emit(
|
667
677
|
"Recalculating speaker ivectors",
|
668
678
|
self.finish_recalculate,
|