Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 855a86c

Browse files
bmartelhlomzik
andauthored
docs: LSDV-4754: Update Audio documentation to point to v3 (#1242)
* docs: LSDV-4574: Update Audio documentation to point to v3 * this apparently shouldn't be committed * Update Paragraphs.js * Add some comment about return type JSDoc can't parse tuple type, so let it be just `Array` with comment * Escape tags in Labels and Choices docs * "publicly" spelling --------- Co-authored-by: hlomzik <hlomzik@gmail.com>
1 parent df15a54 commit 855a86c

File tree

7 files changed

+57
-20
lines changed

7 files changed

+57
-20
lines changed

src/tags/control/Choices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const { Option } = Select;
2727
/**
2828
* The `Choices` tag is used to create a group of choices, with radio buttons or checkboxes. It can be used for single or multi-class classification. Also, it is used for advanced classification tasks where annotators can choose one or multiple answers.
2929
*
30-
* Choices can have dynamic value to load labels from task. This task data should contain a list of options to create underlying <Choice>s. All the parameters from options will be transferred to corresponding tags.
30+
* Choices can have dynamic value to load labels from task. This task data should contain a list of options to create underlying `<Choice>`s. All the parameters from options will be transferred to corresponding tags.
3131
*
3232
* The `Choices` tag can be used with any data types.
3333
* @example

src/tags/control/Labels/Labels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import './Labels.styl';
2222
/**
2323
* The `Labels` tag provides a set of labels for labeling regions in tasks for machine learning and data science projects. Use the `Labels` tag to create a set of labels that can be assigned to identified region and specify the values of labels to assign to regions.
2424
*
25-
* All types of Labels can have dynamic value to load labels from task. This task data should contain a list of options to create underlying <Label>s. All the parameters from options will be transferred to corresponding tags.
25+
* All types of Labels can have dynamic value to load labels from task. This task data should contain a list of options to create underlying `<Label>`s. All the parameters from options will be transferred to corresponding tags.
2626
*
2727
* The Labels tag can be used with audio and text data types. Other data types have type-specific Labels tags.
2828
* @example

src/tags/control/MagicWand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import { FF_DEV_4081, isFF } from '../../utils/feature-flags';
4949
* `crossOrigin` attribute that a normal DOM `img` tag would
5050
* have ([reference])(https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin).
5151
*
52-
* If the image is on a public server or Google/AWS/Azure bucket that is publically readable
52+
* If the image is on a public server or Google/AWS/Azure bucket that is publicly readable
5353
* without any authentication, you should set `crossOrigin` to `anonymous`.
5454
*
5555
* If the image is on a server or a private cloud bucket that requires authentication of any

src/tags/object/Audio.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import { customTypes } from '../../core/CustomTypes';
3939
* @regions AudioRegion
4040
* @meta_title Audio Tag for Labeling Audio
4141
* @meta_description Customize Label Studio to label audio data for machine learning and data science projects.
42-
* @name Audio
4342
* @param {string} name Name of the element
4443
* @param {string} value Data field containing path or a URL to the audio
4544
* @param {string} hotkey Hotkey used to play or pause audio

src/tags/object/AudioNext/model.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { WS_SPEED, WS_VOLUME, WS_ZOOM_X } from './constants';
2727
* <Rating name="rate-1" toName="audio-1" />
2828
* <Audio name="audio-1" value="$audio" />
2929
* </View>
30-
* @name Audio
3130
* @meta_title Audio Tag for Audio Labeling
3231
* @meta_description Customize Label Studio with the Audio tag for advanced audio annotation tasks for machine learning and data science projects.
3332
* @param {string} name - Name of the element

src/tags/object/AudioUltra/model.js

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,32 @@ import { WS_SPEED, WS_VOLUME, WS_ZOOM_X } from './constants';
1919
*
2020
* Use with the following data types: audio
2121
* @example
22-
* <!--Labeling configuration to label regions of audio and rate the audio sample-->
22+
* <!-- Play audio on the labeling interface -->
23+
* <View>
24+
* <Audio name="audio" value="$audio" />
25+
* </View>
26+
* @example
27+
* <!-- Play audio with multichannel support -->
28+
* <View>
29+
* <Audio name="audio" value="$audio" splitchannels="true" />
30+
* </View>
31+
* @example
32+
* <!-- Audio classification -->
33+
* <View>
34+
* <Audio name="audio" value="$audio" />
35+
* <Choices name="ch" toName="audio">
36+
* <Choice value="Positive" />
37+
* <Choice value="Negative" />
38+
* </Choices>
39+
* </View>
40+
* @example
41+
* <!-- Audio transcription -->
42+
* <View>
43+
* <Audio name="audio" value="$audio" />
44+
* <TextArea name="ta" toName="audio" />
45+
* </View>
46+
* @example
47+
* <!-- Labeling configuration to label regions of audio and rate the audio sample-->
2348
* <View>
2449
* <Labels name="lbl-1" toName="audio-1">
2550
* <Label value="Guitar" />
@@ -28,28 +53,42 @@ import { WS_SPEED, WS_VOLUME, WS_ZOOM_X } from './constants';
2853
* <Rating name="rate-1" toName="audio-1" />
2954
* <Audio name="audio-1" value="$audio" />
3055
* </View>
31-
* @name Audio
56+
* @example
57+
* <!-- Sync with video -->
58+
* <View>
59+
* <Video name="video-1" value="$video" sync="audio-1" />
60+
* <Labels name="lbl-1" toName="audio-1">
61+
* <Label value="Guitar" />
62+
* <Label value="Drums" />
63+
* </Labels>
64+
* <Audio name="audio-1" value="$video" sync="video-1" />
65+
* </View>
66+
* @example
67+
* <!-- Sync with paragraphs -->
68+
* <View>
69+
* <Labels name="lbl-1" toName="audio-1">
70+
* <Label value="Guitar" />
71+
* <Label value="Drums" />
72+
* </Labels>
73+
* <Audio name="audio-1" value="$audio" sync="txt-1" />
74+
* <Paragraphs audioUrl="$audio" sync="audio-1" name="txt-1" value="$text" layout="dialogue" showplayer="true" />
75+
* </View>
76+
* @regions AudioRegion
3277
* @meta_title Audio Tag for Audio Labeling
3378
* @meta_description Customize Label Studio with the Audio tag for advanced audio annotation tasks for machine learning and data science projects.
79+
* @name Audio
3480
* @param {string} name - Name of the element
3581
* @param {string} value - Data field containing path or a URL to the audio
36-
* @param {boolean=} [volume=false] - Whether to show a volume slider (from 0 to 1)
37-
* @param {string} [defaultvolume=1] - Default volume level (from 0 to 1)
38-
* @param {boolean} [speed=false] - Whether to show a speed slider (from 0.5 to 3)
3982
* @param {string} [defaultspeed=1] - Default speed level (from 0.5 to 2)
40-
* @param {boolean} [zoom=true] - Whether to show the zoom slider
41-
* @param {string} [defaultzoom=1] - Default zoom level (from 1 to 1500)
83+
* @param {string} [defaultscale=1] - Audio pane default y-scale for waveform
84+
* @param {string} [defaultzoom=1] - Default zoom level for waveform (from 1 to 1500)
85+
* @param {string} [defaultvolume=1] - Default volume level (from 0 to 1)
4286
* @param {string} [hotkey] - Hotkey used to play or pause audio
4387
* @param {string} [sync] object name to sync with
4488
* @param {string} [height=96] - Total height of the audio player
4589
* @param {string} [waveheight=32] - Minimum height of a waveform when in splitchannel mode with multiple channels
46-
* @param {string} [cursorwidth=1] - Audio pane cursor width. it's Measured in pixels.
47-
* @param {string} [cursorcolor=#333] - Audio pane cursor color. Color should be specify in hex decimal string
48-
* @param {string} [defaultscale=1] - Audio pane default y-scale for waveform
49-
* @param {boolean} [autocenter=true] – Always place cursor in the middle of the view
50-
* @param {boolean} [scrollparent=true] – Wave scroll smoothly follows the cursor
51-
* @param {boolean} [splitchannels=true] – Display stereo channels separately
52-
* @param {string} [decoder=ffmpeg] – Decoder type to use to decode audio data. ("ffmpeg" or "webaudio")
90+
* @param {boolean} [splitchannels=false] - Display multichannel separately (if supported by the file)
91+
* @param {string} [decoder=webaudio] - Decoder type to use to decode audio data. (`"webaudio"` or `"ffmpeg"`)
5392
*/
5493
const TagAttrs = types.model({
5594
name: types.identifier,

src/tags/object/Paragraphs/Paragraphs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class HtxParagraphsView extends Component {
3838
* @param {HTMLElement} node
3939
* @param {number} offset
4040
* @param {boolean} [isStart=true]
41-
* @return {[number, HTMLElement, number, number]}
41+
* @return {Array} [offset, node, index, originalIndex]
4242
*/
4343
getOffsetInPhraseElement(container, offset, isStart = true) {
4444
const node = this.getPhraseElement(container);

0 commit comments

Comments
 (0)