@aim-packages/subtitle 0.0.12 → 0.0.14
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 +14 -14
- package/dist/index.d.ts +8 -5
- package/dist/index.es.js +1078 -1134
- package/package.json +29 -29
package/dist/index.d.ts
CHANGED
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
space?: 0 | 1; // 存在多余空格 (Whether there are extra spaces)
|
|
41
41
|
*
|
|
42
42
|
*/
|
|
43
|
-
declare interface AimSegments {
|
|
43
|
+
export declare interface AimSegments {
|
|
44
44
|
st: string;
|
|
45
45
|
et: string;
|
|
46
46
|
text: string;
|
|
47
47
|
index?: number;
|
|
48
48
|
children?: Array<AimSegments>;
|
|
49
|
+
f?: number;
|
|
49
50
|
delete?: boolean;
|
|
50
51
|
cut?: boolean;
|
|
51
52
|
md5?: string;
|
|
@@ -137,7 +138,7 @@ export declare namespace filter {
|
|
|
137
138
|
*/
|
|
138
139
|
declare function formatTime(seconds: number): string;
|
|
139
140
|
|
|
140
|
-
declare type LanguageCode = "auto" | "none" | "zh" | "zh_cn" | "zh_tw" | "yue" | "en" | "ja" | "ko" | "fr" | "es" | "ru" | "de" | "it" | "tr" | "pt" | "vi" | "id" | "th" | "ms" | "ar" | "hi" | "ro" | "ug" | "uz" | "kk" | "az" | "ky" | "fa" | "tg";
|
|
141
|
+
export declare type LanguageCode = "auto" | "none" | "zh" | "zh_cn" | "zh_tw" | "yue" | "en" | "ja" | "ko" | "fr" | "es" | "ru" | "de" | "it" | "tr" | "pt" | "vi" | "id" | "th" | "ms" | "ar" | "hi" | "ro" | "ug" | "uz" | "kk" | "az" | "ky" | "fa" | "tg";
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
* 将语言代码转换为名称
|
|
@@ -172,7 +173,7 @@ declare interface OpenAIResult {
|
|
|
172
173
|
|
|
173
174
|
declare function openaiToAimSegments(json: OpenAIResult): Promise<AimSegments[]>;
|
|
174
175
|
|
|
175
|
-
declare interface OptimizationOptions {
|
|
176
|
+
export declare interface OptimizationOptions {
|
|
176
177
|
emt: boolean;
|
|
177
178
|
ep: boolean;
|
|
178
179
|
zf: boolean;
|
|
@@ -258,6 +259,8 @@ declare type ParserOptions<S, P, E> = {
|
|
|
258
259
|
onEnd?: ParseCallback<E>;
|
|
259
260
|
};
|
|
260
261
|
|
|
262
|
+
export declare type PartialByKey<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
263
|
+
|
|
261
264
|
declare class RepeatCheck {
|
|
262
265
|
threshold: number;
|
|
263
266
|
hit: number;
|
|
@@ -275,9 +278,9 @@ declare interface RepeatCheckOption {
|
|
|
275
278
|
onHit?: (segment: AimSegments[]) => void;
|
|
276
279
|
}
|
|
277
280
|
|
|
278
|
-
declare type RequiredByKey<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
281
|
+
export declare type RequiredByKey<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
279
282
|
|
|
280
|
-
declare type Segment = {
|
|
283
|
+
export declare type Segment = {
|
|
281
284
|
start: number;
|
|
282
285
|
end: number;
|
|
283
286
|
};
|