@aim-packages/subtitle 0.3.1 → 0.3.2
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/README.md +1615 -1615
- package/dist/index.cjs.js +17 -17
- package/dist/index.d.ts +8 -0
- package/dist/index.es.js +303 -301
- package/package.json +33 -33
package/dist/index.d.ts
CHANGED
|
@@ -328,6 +328,13 @@ declare function chunkArrayStrings(strings: string[], characterLimit: number): s
|
|
|
328
328
|
*/
|
|
329
329
|
declare function detectLanguage(text: string): LanguageDetectionResultsEntry;
|
|
330
330
|
|
|
331
|
+
/**
|
|
332
|
+
* 检测字幕文件类型
|
|
333
|
+
* @param text 字幕文件内容
|
|
334
|
+
* @returns 字幕类型:".srt" | ".vtt" | ".ass"
|
|
335
|
+
*/
|
|
336
|
+
declare function detectSubtitleType(text: string): ".srt" | ".vtt" | ".ass";
|
|
337
|
+
|
|
331
338
|
export declare namespace filter {
|
|
332
339
|
export {
|
|
333
340
|
StreamFilter
|
|
@@ -549,6 +556,7 @@ declare function chunkArrayStrings(strings: string[], characterLimit: number): s
|
|
|
549
556
|
tingwuToAimSegments,
|
|
550
557
|
openaiToAimSegments,
|
|
551
558
|
whisperJsonToAimSegments,
|
|
559
|
+
detectSubtitleType,
|
|
552
560
|
parseSubtitle,
|
|
553
561
|
create as createWhisperStreamParser,
|
|
554
562
|
create_2 as createTranslateStreamParser,
|