Display chunks of audio file
Is your feature request related to a problem? Please describe. I work on active learning with long audio files (~1h-2h), I need to present chunks of these audio files to the user for the annotation. I can't really pre-cut the files as they can change during the process (it won't always be the same chunks). I don't really know if we can do this with Label Studio or how to do it.
Describe the solution you'd like A start/end option for audio file that display only this segment to the user. A task will be a audio file with a start/end timestamp.
Describe alternatives you've considered Create a server that create urls on the fly to serve Label Studio and import data during the process, but it doesn't seem very practical. Or re-upload the 2h file for each iteration...
Additional context I have not yet finished setting up the model with Label Studio ML backend, so maybe there is a solution I didn't see in the guide.
@J-Petiot Nice idea! I think we can pass start/end as task data, e.g.:
Labeling config:
<AudioPlus value="$path" start="$start" end="$end">
Task data
{
"path": "/1.mp3",
"start": 10,
"end": 20
}
As I remember LS can load only needed parts of audio, but your serving server must support streaming, LS uploaded files do it.
Thanks @J-Petiot for initialize the issue. We have the same challenge with long audio that cause OOM in the client's browser.
@makseq Just to make sure I understand, you were saying that we can already do that or did you mean to discuss as a future feature?
I would like to add another aspect it that we often need to annotate chunk of audio with corresponding transcription under the form of dialogue and it would benefit from this feature of loading a chunk of audio also. For example:
<Paragraphs
audioUrl="$audio"
name="dialogue"
value="$dialogue"
layout="dialogue"
savetextresult="yes"
nameKey="speaker"
textKey="phrase"
showPlayer="true"
/>
Hi! We have this functionality already and the config is exactly like that one you made.
Hi! We have this functionality already and the config is exactly like that one you made.
What do you mean? I tried this in LS:
<AudioPlus value="$path" start="$start" end="$end">
It didn't work and is not documented anywhere.
It'd be great to have it though!
<View>
<Paragraphs audioUrl="$audio" value="$para" name="paragraphs"
layout="dialogue" textKey="text" nameKey="author"
showPlayer="true"
/>
<Choices name="choices" toName="paragraphs" choice="multiple">
<Choice value="Good quality"/>
<Choice value="Fast speech"/>
</Choices>
</View>
<!-- {"data": {
"para": [
{"text": "test 1", "author": "A", "start": 0.0, "end": 1.0},
{"text": "test 2", "author": "B", "start": 1.0, "end": 2.0},
{"text": "test 3", "author": "A", "start": 2.0, "end": 3.0}
],
"audio": "/static/samples/game.wav"
}}
-->