@aim-packages/subtitle 0.1.4 → 0.1.5
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 +46 -46
- package/dist/index.d.ts +17 -1
- package/dist/index.es.js +417 -369
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -312,6 +312,21 @@ declare function chunkArrayStrings(strings: string[], characterLimit: number): s
|
|
|
312
312
|
match: string;
|
|
313
313
|
}[];
|
|
314
314
|
|
|
315
|
+
/**
|
|
316
|
+
* 修复whisper json的解码问题
|
|
317
|
+
*
|
|
318
|
+
* @export
|
|
319
|
+
* @param {Buffer} inputBuffer 读取的json文件
|
|
320
|
+
* @return {*}
|
|
321
|
+
* @example
|
|
322
|
+
*
|
|
323
|
+
* const { readFile, writeFile } = require("fs/promises");
|
|
324
|
+
* const inputJsonBuffer = await readFile(inputPath)
|
|
325
|
+
* fixWhisperJsonDecode(inputJsonBuffer)
|
|
326
|
+
*
|
|
327
|
+
*/
|
|
328
|
+
declare function fixWhisperJsonDecode(inputBuffer: Buffer): Promise<any>;
|
|
329
|
+
|
|
315
330
|
/**
|
|
316
331
|
* 将秒数转换为 xx:xx:xx.xxx 格式
|
|
317
332
|
*
|
|
@@ -706,7 +721,8 @@ declare function chunkArrayStrings(strings: string[], characterLimit: number): s
|
|
|
706
721
|
outputLrc,
|
|
707
722
|
outputTxt,
|
|
708
723
|
outputMarkdown,
|
|
709
|
-
outputAss
|
|
724
|
+
outputAss,
|
|
725
|
+
fixWhisperJsonDecode
|
|
710
726
|
}
|
|
711
727
|
}
|
|
712
728
|
|