音频
音频标签用于播放音频并显示其波形。适用于需要标注音频区域、查看波形并在标注过程中操作音频的音频标注任务。
适用于以下数据类型:音频
参数
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| name | string |
Name of the element | |
| value | string |
Data field containing path or a URL to the audio. | |
| [defaultspeed] | string |
1 |
Default speed level (from 0.5 to 2). |
| [defaultscale] | string |
1 |
Audio pane default y-scale for waveform. |
| [defaultzoom] | string |
1 |
Default zoom level for waveform. (from 1 to 1500). |
| [defaultvolume] | string |
1 |
Default volume level (from 0 to 1). |
| [hotkey] | string |
Hotkey used to play or pause audio. | |
| [sync] | string |
Object name to sync with. | |
| [height] | string |
96 |
Total height of the audio player. |
| [waveheight] | string |
32 |
Minimum height of a waveform when in splitchannels mode with multiple channels to display. |
| [splitchannels] | boolean |
false |
Display multiple audio channels separately, if the audio file has more than one channel. (NOTE: Requires more memory to operate.) |
| [decoder] | string |
"webaudio" |
Decoder type to use to decode audio data. ("webaudio" or "ffmpeg") |
| [player] | string |
"html5" |
Player type to use to play audio data. ("html5" or "webaudio") |
结果参数
| 名称 | 类型 | 描述 |
|---|---|---|
| original_length | number |
length of the original audio (seconds) |
| value | Object |
|
| value.start | number |
start time of the fragment (seconds) |
| value.end | number |
end time of the fragment (seconds) |
| value.channel | number |
channel identifier which was targeted |
示例JSON
{
"original_length": 18,
"value": {
"start": 3.1,
"end": 8.2,
"channel": 0,
"labels": ["Voice"]
}
}
示例
在标注界面上播放音频
<View>
<Audio name="audio" value="$audio" />
</View>
示例
播放支持多声道的音频
<View>
<Audio name="audio" value="$audio" splitchannels="true" />
</View>
示例
音频分类
<View>
<Audio name="audio" value="$audio" />
<Choices name="ch" toName="audio">
<Choice value="Positive" />
<Choice value="Negative" />
</Choices>
</View>
示例
音频转录
<View>
<Audio name="audio" value="$audio" />
<TextArea name="ta" toName="audio" />
</View>
示例
用于标注音频区域并对音频样本进行评分的标注配置
<View>
<Labels name="lbl-1" toName="audio-1">
<Label value="Guitar" />
<Label value="Drums" />
</Labels>
<Rating name="rate-1" toName="audio-1" />
<Audio name="audio-1" value="$audio" />
</View>
示例
与视频同步
<View>
<Video name="video-1" value="$video" sync="audio-1" />
<Labels name="lbl-1" toName="audio-1">
<Label value="Guitar" />
<Label value="Drums" />
</Labels>
<Audio name="audio-1" value="$video" sync="video-1" />
</View>
示例
与段落同步
<View>
<Labels name="lbl-1" toName="audio-1">
<Label value="Guitar" />
<Label value="Drums" />
</Labels>
<Audio name="audio-1" value="$audio" sync="txt-1" />
<Paragraphs audioUrl="$audio" sync="audio-1" name="txt-1" value="$text" layout="dialogue" showplayer="true" />
</View>