@aim-packages/subtitle 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +13 -13
- package/dist/index.d.ts +5 -9
- package/dist/index.es.js +360 -347
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -75,9 +75,10 @@ declare function chunkSegmentStringsWithIndex(segments: AimSegments[], character
|
|
|
75
75
|
indexResult: number[];
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
declare function consolidateSegments(items:
|
|
78
|
+
declare function consolidateSegments(items: Segment[], option: {
|
|
79
79
|
maxDistance: number;
|
|
80
|
-
|
|
80
|
+
padding: number;
|
|
81
|
+
}): Segment[] | undefined;
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* 匹配中文、日文、韩文字符的正则表达式
|
|
@@ -107,7 +108,7 @@ declare function convertToSeconds(time?: string): number;
|
|
|
107
108
|
* @public
|
|
108
109
|
*/
|
|
109
110
|
declare function create(options?: ParserOptions<AimSegments[], AimSegments[], string> & {
|
|
110
|
-
vad?:
|
|
111
|
+
vad?: Segment[];
|
|
111
112
|
}): Parser<string>;
|
|
112
113
|
|
|
113
114
|
declare function create_2(options?: ParserOptions<RequiredByKey<Partial<AimSegments>, "index">[], Partial<AimSegments>[], string>): Parser<string>;
|
|
@@ -276,7 +277,7 @@ declare interface RepeatCheckOption {
|
|
|
276
277
|
|
|
277
278
|
declare type RequiredByKey<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
278
279
|
|
|
279
|
-
declare type
|
|
280
|
+
declare type Segment = {
|
|
280
281
|
start: number;
|
|
281
282
|
end: number;
|
|
282
283
|
};
|
|
@@ -373,11 +374,6 @@ export declare namespace utils {
|
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
376
|
|
|
376
|
-
declare type VADTimeItem = {
|
|
377
|
-
start: number;
|
|
378
|
-
end: number;
|
|
379
|
-
};
|
|
380
|
-
|
|
381
377
|
declare function vttToAimSegments(text: string): Promise<AimSegments[]>;
|
|
382
378
|
|
|
383
379
|
export { }
|