-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathindex.ts
65 lines (58 loc) · 1.08 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import type { LabelValue } from '../../base';
/**
* 音频片断分割
*/
export type AudioSegmentName = 'segment';
/**
* 音频时间戳标注
*/
export type AudioFrameName = 'frame';
/**
* 音频标注类型
*/
export type AudioAnnotationType = AudioSegmentName | AudioFrameName;
/**
* 音频片断分割标注数据
*/
export interface AudioSegmentAnnotation extends LabelValue {
/**
* 片断分割标注类型
*/
type: AudioSegmentName;
/**
* 标注id
*/
id: string;
/**
* 开始时间
*/
start: number;
/**
* 结束时间
*/
end: number;
/**
* 标注顺序
*/
order: number;
}
/**
* 音频时间戳标注数据
*/
export interface AudioFrameAnnotation extends Omit<AudioSegmentAnnotation, 'start' | 'end' | 'type'> {
/**
* 时间戳标注类型
*/
type: AudioFrameName;
/**
* 时间戳
*/
time: number;
}
export type AudioAnnotationData = AudioSegmentAnnotation | AudioFrameAnnotation;
/**
* 音频标注数据在UI层的表示
*/
export type AudioAnnotationInUI = AudioAnnotationData & {
visible?: boolean;
};