add transcribe option

This commit is contained in:
j 2025-01-24 16:23:19 +05:30
parent 03eb3d4a56
commit 6341e64a64

View file

@ -52,6 +52,7 @@ Ox.AnnotationPanel = function(options, self) {
editable: false,
enableExport: false,
enableImport: false,
enableTranscribe: false,
highlight: '',
highlightAnnotations: 'none',
highlightLayer: '*',
@ -304,7 +305,11 @@ Ox.AnnotationPanel = function(options, self) {
{},
{id: 'import', title: Ox._('Import Annotations...'), disabled: !self.options.enableImport},
{id: 'export', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport},
]
].concat(
self.options.enableTranscribe ? [
{id: 'transcribe', title: Ox._('Transcribe Audio...')},
]: []
)
),
maxWidth: 256,
style: 'square',
@ -352,6 +357,8 @@ Ox.AnnotationPanel = function(options, self) {
// ...
} else if (data.id == 'showentityinfo') {
that.triggerEvent('showentityinfo', annotation.entity);
} else if (data.id == 'transcribe') {
that.triggerEvent('transcribe');
} else if (data.id == 'undo') {
// ...
}